Some SlackBuild scripts for Slackware.
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

41 lines
645 B

#!/bin/bash
PIDFILE=/var/run/citadel/webcit.pid
LOGFILE=/var/log/webcit.log
ADDRESS=0.0.0.0
PORT=2000
CITADEL_HOME=/var/run/citadel
case "$1" in
start)
/usr/sbin/webcit -i $ADDRESS -p $PORT \
-t $LOGFILE -D $PIDFILE -c -f \
uds $CITADEL_HOME
;;
stop)
[ -f $PIDFILE ] && kill -TERM $(< $PIDFILE)
rm -f $PIDFILE
;;
restart)
$0 stop
sleep 2
$0 start
;;
status)
if [ -f $PIDFILE ] && kill -0 $(< $PIDFILE) ; then
echo "WebCit is running."
else
echo "WebCit is not running."
fi
;;
*)
echo "Usage: $0 {start|stop|restart|status}"
exit 1
;;
esac
exit 0