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/initscripts/expression

44 lines
947 B
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
# script more readable. Look in /etc/defaults/apache for editable variables.
NAME=expression
DAEMON=/usr/bin/$NAME
PIDFILE=/var/run/$NAME.pid
CONF=/etc/$NAME/config.xml
case "$1" in
start)
echo -n "Starting web server: $NAME"
$ENV start-stop-daemon --start --pidfile $PIDFILE --exec $DAEMON > /dev/null
;;
stop)
echo -n "Stopping web server: $NAME"
start-stop-daemon --stop --pidfile $PIDFILE --oknodo
;;
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