Skip to content
Snippets Groups Projects
Commit 170f697d authored by Tomáš Plesník's avatar Tomáš Plesník
Browse files

pridany LSB tagy pro Debiani OS

parent f7a16850
No related branches found
No related tags found
No related merge requests found
......@@ -31,22 +31,30 @@
# otherwise) arising in any way out of the use of this software, even
# if advised of the possibility of such damage.
WARDEN="/opt/warden-server/bin/warden-server.pl"
### BEGIN INIT INFO
# Provides: wardend
# Required-Start: $local_fs $network $syslog $time
# Required-Stop: $local_fs $syslog $time
# Default-Start: 2 3 4 5
# Default-Stop:
# Short-Description: Start the Warden server
# Description: Starts or stops server for exchange of events
# among CSIRT teams
### END INIT INFO
DAEMON="/opt/warden-server/bin/warden-server.pl"
PID_FILE="/var/run/warden-server.pl.pid"
LOCK_FILE="/var/lock/warden-server"
SCRIPTNAME=`basename "$0"`
# check if daemon is present and executable
test -x $DAEMON || exit 0
if [ $UID -ne 0 ]; then
echo "You must be root for runnnig this script!"
exit 1
fi
if [ -z $WARDEN ]; then
echo "Sorry, but warden-server.pl does not exist!"
exit 1
fi
usage() {
echo "Usage: $0 [start|stop|status|restart|force-stop]"
exit 1
......@@ -73,7 +81,7 @@ warden_start() {
echo "Warden daemon is running (pid $PID)."
else
logger -s "Starting Warden server daemon ..."
$WARDEN
$DAEMON
touch $LOCK_FILE
fi
}
......@@ -133,9 +141,9 @@ case $1 in
warden_force_stop
;;
restart)
warden_stop
$0 stop
sleep 1
warden_start
$0 start
;;
*)
usage
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment