#! /bin/sh # ### BEGIN INIT INFO # Provides: autoscan-network-daemon # Required-Start: $network # Required-Stop: $network # Default-Start: 3 5 # Default-Stop: 0 1 6 # description: AutoScan is an application designed to explore and to manage your network. ### END INIT INFO AUTOSCAN_BIN=/usr/sbin/autoscan-network-daemon test -x $AUTOSCAN_BIN || exit 0 # Source function library. . /etc/init.d/functions . /etc/sysconfig/network # Check that networking is configured. [ ${NETWORKING} = "no" ] && exit 0 RETVAL=0 start() { gprintf "Starting autoscan-network-daemon: " $AUTOSCAN_BIN -d > /var/log/autoscan-network-daemon RETVAL=$? if [ $RETVAL = 0 ]; then touch /var/lock/subsys/autoscan-network-daemon success "%s startup" "$base" else failure "%s startup" "$base" fi echo return $RETVAL } stop() { gprintf "Stopping autoscan-network-daemon: " killproc $AUTOSCAN_BIN RETVAL=$? if [ $RETVAL = 0 ]; then rm -f /var/lock/subsys/autoscan-network-daemon success "%s stop" "$base" else failure "%s stop" "$base" fi echo return $RETVAL } restart() { stop start } RETVAL=0 # See how we were called. case "$1" in start) start ;; stop) stop ;; status) status autoscan-network-daemon ;; restart) restart ;; condrestart) if [ -f /var/lock/subsys/autoscan-network-daemon ]; then restart fi ;; *) gprintf "Usage: autoscan-network {start|stop|status|restart|condrestart}\n" "$0" exit 1 esac exit $?