1
0
mirror of https://git.freebsd.org/ports.git synced 2026-06-02 11:08:52 +00:00

net/sniproxy: Fix rc.d to use daemon(8) wrapper

PR:		295110
Reported by:	sears_AT_cs.berkeley_DOT_edu
This commit is contained in:
Kirill Ponomarev
2026-05-12 12:25:53 +00:00
parent 286b4a2b40
commit 27f6269a95
2 changed files with 15 additions and 20 deletions
+7 -11
View File
@@ -1,5 +1,6 @@
PORTNAME= sniproxy
DISTVERSION= 0.7.0
PORTREVISION= 1
CATEGORIES= net
MAINTAINER= krion@FreeBSD.org
@@ -15,22 +16,17 @@ LIB_DEPENDS= libev.so:devel/libev \
USES= autoreconf localbase pkgconfig
SUB_FILES= pkg-message
USE_RC_SUBR= sniproxy
USE_GITHUB= yes
GH_ACCOUNT= dlundquist
GNU_CONFIGURE= yes
USE_LDCONFIG= yes
USE_RC_SUBR= sniproxy
GNU_CONFIGURE= yes
PLIST_FILES= share/man/man5/sniproxy.conf.5.gz \
share/man/man8/sniproxy.8.gz \
SUB_FILES= pkg-message
PLIST_FILES= "@sample etc/sniproxy.conf.sample" \
sbin/sniproxy \
"@sample etc/sniproxy.conf.sample"
post-patch:
@${REINPLACE_CMD} -e 's|/var/tmp/|/var/run/|' ${WRKSRC}/${PORTNAME}.conf
share/man/man5/sniproxy.conf.5.gz \
share/man/man8/sniproxy.8.gz
post-install::
${INSTALL_DATA} ${WRKSRC}/sniproxy.conf ${STAGEDIR}${PREFIX}/etc/sniproxy.conf.sample
+8 -9
View File
@@ -16,20 +16,19 @@
name=sniproxy
rcvar=sniproxy_enable
command=%%PREFIX%%/sbin/sniproxy
pidfile=${sniproxy_pidfile:-"/var/run/sniproxy.pid"}
load_rc_config ${name}
sniproxy_enable=${sniproxy_enable:-"NO"}
sniproxy_conf=${sniproxy_conf:-"%%PREFIX%%/etc/sniproxy.conf"}
stop_postcmd="rm -f $pidfile"
sig_reload="HUP"
load_rc_config ${name}
pidfile=${sniproxy_pidfile:-"/var/run/${name}.pid"}
procname=%%PREFIX%%/sbin/${name}
command=/usr/sbin/daemon
command_args="-c -p ${pidfile} -t ${name} -- ${procname} -f -c ${sniproxy_conf}"
required_files=${sniproxy_conf}
command_args="-c ${sniproxy_conf}"
run_rc_command "$1"
extra_commands="reload"
sig_reload="HUP"
run_rc_command "$1"