mathopd: new rc script
This commit is contained in:
parent
b2acd32727
commit
1035d9a354
@ -1,5 +1,5 @@
|
|||||||
ec0d71c0c75986c1c4974320788945cc dir_cgi-1.1.tar.gz
|
ec0d71c0c75986c1c4974320788945cc dir_cgi-1.1.tar.gz
|
||||||
56ed28d0c582903a2c29c9c5f9153e57 mathopd
|
c59d4a211a5327364aac974d9df20657 mathopd
|
||||||
d17bf698470fccf48b9cf5a70f5b3bc2 mathopd-1.6b15.tar.gz
|
d17bf698470fccf48b9cf5a70f5b3bc2 mathopd-1.6b15.tar.gz
|
||||||
d2079b5851e665ac7713957fe9d62cb5 mathopd-config.patch
|
d2079b5851e665ac7713957fe9d62cb5 mathopd-config.patch
|
||||||
dd645079a41380fbb301da6d5559de84 mathopd.8.gz
|
dd645079a41380fbb301da6d5559de84 mathopd.8.gz
|
||||||
|
@ -4,7 +4,7 @@
|
|||||||
|
|
||||||
name=mathopd
|
name=mathopd
|
||||||
version=1.6b15
|
version=1.6b15
|
||||||
release=1
|
release=2
|
||||||
source=(http://www.mathopd.org/dist/$name-$version.tar.gz \
|
source=(http://www.mathopd.org/dist/$name-$version.tar.gz \
|
||||||
http://jue.li/misc/dir_cgi/dir_cgi-1.1.tar.gz \
|
http://jue.li/misc/dir_cgi/dir_cgi-1.1.tar.gz \
|
||||||
http://www.mathopd.org/doc/mathopd.8.gz \
|
http://www.mathopd.org/doc/mathopd.8.gz \
|
||||||
|
@ -3,20 +3,32 @@
|
|||||||
# /etc/rc.d/mathopd: start/stop mathopd http daemon
|
# /etc/rc.d/mathopd: start/stop mathopd http daemon
|
||||||
#
|
#
|
||||||
|
|
||||||
|
SSD=/sbin/start-stop-daemon
|
||||||
|
PROG=/usr/sbin/mathopd
|
||||||
|
OPTS="-f /etc/mathopd.conf"
|
||||||
|
|
||||||
case $1 in
|
case $1 in
|
||||||
start)
|
start)
|
||||||
/usr/sbin/mathopd -f /etc/mathopd.conf
|
$SSD --start --exec $PROG -- $OPTS
|
||||||
;;
|
;;
|
||||||
stop)
|
stop)
|
||||||
killall -q /usr/sbin/mathopd
|
$SSD --stop --retry 10 --exec $PROG
|
||||||
;;
|
;;
|
||||||
restart)
|
restart)
|
||||||
$0 stop
|
$0 stop
|
||||||
sleep 2
|
|
||||||
$0 start
|
$0 start
|
||||||
;;
|
;;
|
||||||
|
status)
|
||||||
|
$SSD --status --exec $PROG
|
||||||
|
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
|
esac
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user