Harden the build system. Fix configuration error processing.
This commit is contained in:
parent
51fbbfb078
commit
214d2f2f31
5 changed files with 121 additions and 45 deletions
55
siahsd-init-script
Executable file
55
siahsd-init-script
Executable file
|
@ -0,0 +1,55 @@
|
|||
#! /bin/sh
|
||||
# /etc/init.d/siahsd
|
||||
#
|
||||
# Written by Wilco Baan Hofman <wilco@baanhofman.nl>
|
||||
|
||||
### BEGIN INIT INFO
|
||||
# Provides: siahsd
|
||||
# Required-Start: $network
|
||||
# Required-Stop: $network
|
||||
# Should-Start: postgresql mysql
|
||||
# Should-Stop: postgresql mysql
|
||||
# Default-Start: 2 3 4 5
|
||||
# Default-Stop: 0 1 6
|
||||
# Short-Description: SIA-HS Daemon
|
||||
# Description: SIA-HS Daemon
|
||||
### END INIT INFO
|
||||
|
||||
DAEMON=/usr/local/src/siahsd/build/siahsd
|
||||
DAEMON_ARGS=
|
||||
PIDFILE=/var/run/siahsd.pid
|
||||
|
||||
start() {
|
||||
echo -n "Starting SIA-HS Daemon: "
|
||||
if start-stop-daemon --start --quiet --pidfile $PIDFILE --exec $DAEMON -- $DAEMON_ARGS; then
|
||||
echo "siahsd."
|
||||
else
|
||||
echo "FAILED."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
stop() {
|
||||
echo -n "Stopping SIA-HS Daemon: "
|
||||
if start-stop-daemon --stop --quiet --retry=TERM/30/KILL/5 --pidfile $PIDFILE --exec $DAEMON; then
|
||||
echo "siahsd."
|
||||
else
|
||||
echo "FAILED."
|
||||
return 1
|
||||
fi
|
||||
}
|
||||
|
||||
|
||||
case $1 in
|
||||
start)
|
||||
start
|
||||
;;
|
||||
stop)
|
||||
stop
|
||||
;;
|
||||
restart)
|
||||
stop
|
||||
start
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Add table
Add a link
Reference in a new issue