diff options
author | Mikhail Teterin <mi@FreeBSD.org> | 2007-04-16 04:26:28 +0000 |
---|---|---|
committer | Mikhail Teterin <mi@FreeBSD.org> | 2007-04-16 04:26:28 +0000 |
commit | f9752c8ba0c536de322b124b392e7b73d6521edb (patch) | |
tree | d327dcffe18da079457261acfc1d64e1c7b765e6 /net/socks5 | |
parent | e2dd491a7d33477014d9c0880b4cf455352c6d5a (diff) |
Notes
Diffstat (limited to 'net/socks5')
-rw-r--r-- | net/socks5/Makefile | 4 | ||||
-rw-r--r-- | net/socks5/files/socks5.sh.in | 33 | ||||
-rw-r--r-- | net/socks5/files/socks5.sh.sample | 20 | ||||
-rw-r--r-- | net/socks5/pkg-plist | 1 |
4 files changed, 36 insertions, 22 deletions
diff --git a/net/socks5/Makefile b/net/socks5/Makefile index 8b53d99b4d0f..aef65447e3d3 100644 --- a/net/socks5/Makefile +++ b/net/socks5/Makefile @@ -7,7 +7,7 @@ PORTNAME= socks5 PORTVERSION= 1.0.11 -PORTREVISION= 3 +PORTREVISION= 4 CATEGORIES= net security MASTER_SITES= http://freeware.sgi.com/source/socks5/ DISTNAME= socks5-v1.0r11 @@ -15,6 +15,7 @@ DISTNAME= socks5-v1.0r11 MAINTAINER= josh@tcbug.org COMMENT= SOCKS v5 application layer gateway and clients +USE_RC_SUBR= ${PORTNAME}.sh NO_CDROM= "NEC has a funky license for this software" RESTRICTED= "no commercial use" @@ -31,6 +32,7 @@ CONFLICTS= dante-[0-9]* WRKSRC= ${WRKDIR}/${DISTNAME} INSTALLS_SHLIB= yes GNU_CONFIGURE= yes +CFLAGS+= -DHAVE_VSNPRINTF CONFIGURE_ARGS= --with-libconffile=${PREFIX}/etc/libsocks5.conf \ --with-srvconffile=${PREFIX}/etc/socks5.conf \ --with-srvpidfile=/var/run/socks5.pid \ diff --git a/net/socks5/files/socks5.sh.in b/net/socks5/files/socks5.sh.in new file mode 100644 index 000000000000..6a7db4ab715d --- /dev/null +++ b/net/socks5/files/socks5.sh.in @@ -0,0 +1,33 @@ +#!/bin/sh +# +# +# PROVIDE: socks5 +# REQUIRE: DAEMON +# +# Add the following line to /etc/rc.conf to enable socks5 +# +# socks5_enable="YES" +# + +socks5_enable=${socks5_enable-"NO"} + +. /etc/rc.subr + +name=socks5 +rcvar=`set_rcvar` +pidfile="/var/run/$name.pid-1080" + +command=%%PREFIX%%/bin/socks5 + +stop_cmd=socks5_stop + +socks5_stop() +{ + echo "Stopping socks5." + kill -9 `cat ${pidfile}` + rm ${pidfile} +} + +load_rc_config ${name} + +run_rc_command "$1" diff --git a/net/socks5/files/socks5.sh.sample b/net/socks5/files/socks5.sh.sample deleted file mode 100644 index 77d485d3959c..000000000000 --- a/net/socks5/files/socks5.sh.sample +++ /dev/null @@ -1,20 +0,0 @@ -#!/bin/sh - -if ! PREFIX=$(expr $0 : "\(/.*\)/etc/rc\.d/$(basename $0)\$"); then - echo "$0: Cannot determine the PREFIX" >&2 - exit 1 -fi - -case "$1" in -start) - [ -x ${PREFIX}/bin/socks5 -a -f ${PREFIX}/etc/socks5.conf ] && ${PREFIX}/bin/socks5 && echo -n ' socks5' - ;; -stop) - killall socks5 && echo -n ' socks5' - ;; -*) - echo "Usage: `basename $0` {start|stop}" >&2 - ;; -esac - -exit 0 diff --git a/net/socks5/pkg-plist b/net/socks5/pkg-plist index caacd822b1e4..3ee9d11bbfe3 100644 --- a/net/socks5/pkg-plist +++ b/net/socks5/pkg-plist @@ -1,4 +1,3 @@ -etc/rc.d/socks5.sh bin/socks5 bin/runsocks bin/stopsocks |