mirror of
https://github.com/Ponce/slackbuilds
synced 2024-11-28 10:02:43 +01:00
a08d8dd0a6
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
49 lines
682 B
Bash
49 lines
682 B
Bash
#!/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
|