#!/bin/sh -e ### BEGIN INIT INFO # Provides: linux-isg # Required-Start: $networking # Required-Stop: $networking # Default-Start: 2 3 4 5 # Default-Stop: 0 1 6 ### END INIT INFO PATH=/bin:/usr/bin:/sbin:/usr/sbin:/usr/local/sbin; . /lib/lsb/init-functions case "$1" in start) log_daemon_msg "Starting Linux ISG daemon" "linux-isg" if /opt/ISG/bin/ISGd.pl; then log_end_msg 0 else log_end_msg 1 fi ;; restart) log_daemon_msg "Restarting Linux ISG daemon" "linux-isg" start-stop-daemon --stop --quiet --oknodo --retry 180 --pidfile /var/run/ISGd.pid if /opt/ISG/bin/ISGd.pl; then log_end_msg 0 else log_end_msg 1 fi ;; stop) log_daemon_msg "Stopping Linux ISG daemon" "linux-isg" start-stop-daemon --stop --quiet --oknodo --retry 180 --pidfile /var/run/ISGd.pid log_end_msg 0 ;; *) log_success_msg "Usage: /etc/init.d/linux-isg {start|stop|restart}" exit 1 ;; esac exit 0