diff options
Diffstat (limited to 'stunnel')
-rw-r--r-- | stunnel/.md5sum | 4 | ||||
-rw-r--r-- | stunnel/Pkgfile | 2 | ||||
-rw-r--r-- | stunnel/stunnel | 21 |
3 files changed, 19 insertions, 8 deletions
diff --git a/stunnel/.md5sum b/stunnel/.md5sum index 6f04dd159..7d323382a 100644 --- a/stunnel/.md5sum +++ b/stunnel/.md5sum @@ -1,3 +1,3 @@ -20d8078911733e4de22903034e725db6 stunnel -a0edda805eb7d6ea600a230fb0979ea1 stunnel-5.10.tar.gz +41e68853b8005ad297354e5097856773 stunnel +213df05124cda9bd0a6c9eaa0c25a48a stunnel-5.11.tar.gz 1f4f1cad1434b7d8641bd2ebe2be6e1c stunnel-config.patch diff --git a/stunnel/Pkgfile b/stunnel/Pkgfile index b82609114..0c5fb0eb8 100644 --- a/stunnel/Pkgfile +++ b/stunnel/Pkgfile @@ -4,7 +4,7 @@ # Depends on: openssl tcp_wrappers zlib name=stunnel -version=5.10 +version=5.11 release=1 source=(http://stunnel.cybermirror.org/archive/5.x/$name-$version.tar.gz \ $name-config.patch $name) diff --git a/stunnel/stunnel b/stunnel/stunnel index b1d81a9c9..313552db3 100644 --- a/stunnel/stunnel +++ b/stunnel/stunnel @@ -3,6 +3,10 @@ # /etc/rc.d/stunnel: start/stop stunnel daemon # +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/stunnel +PID=/var/run/stunnel/stunnel.pid + CRT=/etc/ssl/certs/stunnel.crt KEY=/etc/ssl/keys/stunnel.key @@ -11,19 +15,26 @@ start) if [ ! -s $KEY -o ! -s $CRT ]; then /usr/bin/mksslcert $KEY $CRT fi - /usr/sbin/stunnel + $SSD --start --pidfile $PID --exec $PROG ;; stop) - killall -q /usr/sbin/stunnel + $SSD --stop --retry 10 --pidfile $PID ;; restart) $0 stop - sleep 2 $0 start ;; +status) + $SSD --status --pidfile $PID + case $? in + 0) echo "$PROG is running" ;; + 1) echo "$PROG is not running but the pid file $PID exists" ;; + 3) echo "$PROG is not running" ;; + 4) echo "Unable to determine the program status" ;; + esac + ;; *) - echo "usage: $0 [start|stop|restart]" + echo "usage: $0 [start|stop|restart|status]" ;; esac - # End of file |