diff --git a/net/sniproxy/Makefile b/net/sniproxy/Makefile index 33584142baba..3b9816e08e30 100644 --- a/net/sniproxy/Makefile +++ b/net/sniproxy/Makefile @@ -1,38 +1,34 @@ PORTNAME= sniproxy DISTVERSION= 0.7.0 +PORTREVISION= 1 CATEGORIES= net MAINTAINER= krion@FreeBSD.org COMMENT= Proxy that routes based on TLS server name extension WWW= https://github.com/dlundquist/sniproxy LICENSE= BSD2CLAUSE LICENSE_FILE= ${WRKSRC}/COPYING LIB_DEPENDS= libev.so:devel/libev \ libpcre2-8.so:devel/pcre2 \ libudns.so:dns/udns 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 .include diff --git a/net/sniproxy/files/sniproxy.in b/net/sniproxy/files/sniproxy.in index d07bba4856fc..0a714b7929cc 100644 --- a/net/sniproxy/files/sniproxy.in +++ b/net/sniproxy/files/sniproxy.in @@ -1,35 +1,34 @@ #!/bin/sh # PROVIDE: sniproxy # REQUIRE: DAEMON # KEYWORD: shutdown # # Add the following lines to /etc/rc.conf to enable sniproxy: # # sniproxy_enable="YES" # # . /etc/rc.subr 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"