diff options
author | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-08-12 18:31:18 +0000 |
---|---|---|
committer | Baptiste Daroussin <bapt@FreeBSD.org> | 2010-08-12 18:31:18 +0000 |
commit | 398cd9b1170886e5391e9012b76bddf63b482512 (patch) | |
tree | 874fdc3db22125b7aa12f993d465cc0f64f722a6 /net/sslh | |
parent | 1ef8bfe3e068bd4041c9697fa901264c31bc503c (diff) |
Notes
Diffstat (limited to 'net/sslh')
-rw-r--r-- | net/sslh/Makefile | 3 | ||||
-rw-r--r-- | net/sslh/files/sslh.in | 63 |
2 files changed, 66 insertions, 0 deletions
diff --git a/net/sslh/Makefile b/net/sslh/Makefile index e81160f763ed..cb17ddbcc163 100644 --- a/net/sslh/Makefile +++ b/net/sslh/Makefile @@ -7,6 +7,7 @@ PORTNAME= sslh PORTVERSION= 1.7a +PORTREVISION= 1 CATEGORIES= net MASTER_SITES= http://www.rutschle.net/tech/ @@ -19,6 +20,8 @@ USE_PERL5_BUILD= yes MAN8= sslh.8 PLIST_FILES= sbin/sslh +USE_RC_SUBR= sslh + post-patch: @${REINPLACE_CMD} -e 's|^PREFIX=/usr/local|PREFIX=${PREFIX}|g' ${WRKSRC}/Makefile diff --git a/net/sslh/files/sslh.in b/net/sslh/files/sslh.in new file mode 100644 index 000000000000..5af38892522d --- /dev/null +++ b/net/sslh/files/sslh.in @@ -0,0 +1,63 @@ +#!/bin/sh + +# $FreeBSD$ +# +# sslh startup script +# +# PROVIDE: sslh +# REQUIRE: login +# KEYWORD: shutdown + +# +# Add the following to /etc/rc.conf[.local] to enable this service +# +# sslh_enable="YES" +# +# You can fine tune others variables too: +# sslh_fib="NONE" +# sslh_pidfile="/var/run/sslh.pid" +# sslh_ssltarget="localhost:443" +# sslh_sshtarget="localhost:22" +# sslh_sshtimeout="2" +# sslh_listening="0.0.0.0:8443" +# sslh_uid="nobody" +# sslh_flags="" + +sslh_setfib() { + sysctl net.fibs >/dev/null 2>&1 || return 0 + + case "$sslh_fib" in + [Nn][Oo][Nn][Ee]) + ;; + *) + command="setfib -F ${sslh_fib} ${command}" + ;; + esac +} + +. /etc/rc.subr + +name="sslh" +rcvar=`set_rcvar` + +command="%%PREFIX%%/sbin/${name}" +start_precmd="sslh_setfib" + +load_rc_config $name + +sslh_enable=${sslh_enable:-"NO"} +sslh_fib=${sslh_fib:-"NONE"} +sslh_listening=${sslh_listening:-"0.0.0.0:443"} +sslh_sshtarget=${sslh_sshtarget:-"localhost:22"} +sslh_ssltarget=${sslh_ssltarget:-"localhost:8443"} +sslh_uid=${sslh_uid:-"nobody"} +sslh_sshtimeout=${sslh_sshtimeout:-"2"} +sslh_ssltarget=${sslh_ssltarget:-"localhost:8443"} + +pidfile=${sslh_pidfile:-"/var/run/sslh.pid"} + +command_args="-t ${sslh_sshtimeout} -p ${sslh_listening} \ + -l ${sslh_ssltarget} -s ${sslh_sshtarget} -P ${pidfile} \ + -u ${sslh_uid}" + +run_rc_command "$1" |