mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-22 19:44:21 +01:00
50 lines
682 B
Text
50 lines
682 B
Text
|
#!/bin/sh
|
||
|
#
|
||
|
# description: Regina Stack daemon.
|
||
|
# processname: rxstack
|
||
|
|
||
|
# 2014-06-09 R Narron Rewrite for Slackware
|
||
|
|
||
|
DAEMON=/usr/bin/rxstack
|
||
|
RETVAL=0
|
||
|
|
||
|
# start rxstack
|
||
|
rxstack_start() {
|
||
|
if [ -x $DAEMON ]; then
|
||
|
echo -n "Starting Regina Stack: $DAEMON"
|
||
|
$DAEMON -d
|
||
|
RETVAL=$?
|
||
|
fi
|
||
|
}
|
||
|
|
||
|
# stop rxstack
|
||
|
rxstack_stop() {
|
||
|
echo -n "Shutting down Regina Stack: "
|
||
|
killall -2 $DAEMON
|
||
|
RETVAL=$?
|
||
|
}
|
||
|
|
||
|
# restart rxstack
|
||
|
rxstack_restart() {
|
||
|
rxstack_stop
|
||
|
sleep 1
|
||
|
rxstack_start
|
||
|
}
|
||
|
|
||
|
case "$1" in
|
||
|
start)
|
||
|
rxstack_start
|
||
|
;;
|
||
|
stop)
|
||
|
rxstack_stop
|
||
|
;;
|
||
|
restart)
|
||
|
rxstack_restart
|
||
|
;;
|
||
|
*)
|
||
|
echo "Usage: $0 {start|stop|restart}"
|
||
|
RETVAL=1
|
||
|
esac
|
||
|
|
||
|
exit $RETVAL
|