diff options
author | Juergen Daubert <jue@jue.li> | 2015-03-05 11:10:30 +0100 |
---|---|---|
committer | Juergen Daubert <jue@jue.li> | 2015-03-05 11:10:30 +0100 |
commit | 4b5b46c292b648b64348ca5ddb846055b5fae5bf (patch) | |
tree | 090a4d10cc68488d3d8d67ab10dd4b2652398b01 /masqmail | |
parent | 960b4ed6d835c6e32984b11dd0550eb314b97e35 (diff) | |
download | opt-4b5b46c292b648b64348ca5ddb846055b5fae5bf.tar.gz opt-4b5b46c292b648b64348ca5ddb846055b5fae5bf.tar.xz |
masqmail: new rc script
Diffstat (limited to 'masqmail')
-rw-r--r-- | masqmail/.md5sum | 2 | ||||
-rw-r--r-- | masqmail/Pkgfile | 2 | ||||
-rw-r--r-- | masqmail/masqmail | 21 |
3 files changed, 19 insertions, 6 deletions
diff --git a/masqmail/.md5sum b/masqmail/.md5sum index 98f48a603..efd767c67 100644 --- a/masqmail/.md5sum +++ b/masqmail/.md5sum @@ -1,2 +1,2 @@ -413f66f053693a10abc4c9c632fd0659 masqmail +af808bb35a4d7ed37dc895d5a13201b9 masqmail 67bc223b0ae2e990a4255265f62cc1e4 masqmail-0.3.5.tar.gz diff --git a/masqmail/Pkgfile b/masqmail/Pkgfile index bb116d1fc..d9d3bf15a 100644 --- a/masqmail/Pkgfile +++ b/masqmail/Pkgfile @@ -5,7 +5,7 @@ name=masqmail version=0.3.5 -release=1 +release=2 source=(http://marmaro.de/prog/masqmail/files/$name-$version.tar.gz masqmail) diff --git a/masqmail/masqmail b/masqmail/masqmail index e3764bd2a..af5262eac 100644 --- a/masqmail/masqmail +++ b/masqmail/masqmail @@ -3,20 +3,33 @@ # /etc/rc.d/masqmail: start/stop masqmail SMTP daemon # +SSD=/sbin/start-stop-daemon +PROG=/usr/sbin/masqmail +PID=/var/run/masqmail.pid +OPTS="-bd -q15m" + case $1 in start) - /usr/sbin/masqmail -bd -q20m + $SSD --start --pidfile $PID --exec $PROG -- $OPTS ;; stop) - killall -q /usr/sbin/masqmail + $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 |