This repository has been archived on 2023-02-21. You can view files and clone it, but cannot push or open issues or pull requests.
expression/debian/expression.init

51 lines
1.1 KiB
Bash
Executable File

#!/bin/bash
#
# expression Start the expression HTTP server.
#
# The variables below are NOT to be changed. They are there to make the
NAME=expression
DAEMON=/usr/sbin/expression-server
PIDFILE=/var/run/$NAME.pid
CONF=/etc/$NAME/config.xml
case "$1" in
start)
echo -n "Starting expression web server: $NAME"
$ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON > /dev/null
;;
stop)
echo -n "Stopping expression web server: $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --oknodo
;;
force-reload)
echo -n "Force-reloading $NAME"
if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then
$ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON > /dev/null
fi
;;
restart)
echo -n "Restarting $NAME"
if ! start-stop-daemon -q --stop --pidfile $PIDFILE --signal HUP; then
$ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON > /dev/null
fi
;;
*)
echo "Usage: /etc/init.d/$NAME {start|stop|reload|restart}"
exit 1
;;
esac
if [ $? -eq 0 ]; then
echo .
exit 0
else
echo " failed"
exit 1
fi