slackbuilds_ponce/development/regina-rexx/rc.rxstack
Richard Narron a08d8dd0a6 development/regina-rexx: Fix rc script.
Signed-off-by: Willy Sudiarto Raharjo <willysr@slackbuilds.org>
2014-06-18 16:18:59 -05:00

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