#!/bin/sh # # blocksshd This shell script takes care of # # chkconfig: - 55 45 # description: blocksshd daemon # probe: true # Source function library. . /etc/rc.d/init.d/functions # Source networking configuration. . /etc/sysconfig/network # Check that networking is up. [ ${NETWORKING} = "no" ] && exit 0 [ -f /usr/bin/blocksshd ] || exit 0 [ -f /etc/blocksshd.conf ] || exit 0 DAEMON=blocksshd start() { echo -n "Starting $DAEMON: " daemon /usr/bin/blocksshd --start RETVAL=$? echo [ $RETVAL = 0 ] && touch /var/lock/subsys/blocksshd return $RETVAL } stop() { # Stop daemon. echo -n "Shutting down $DAEMON: " killproc /usr/bin/blocksshd #--stop RETVAL=$? echo [ $RETVAL = 0 ] && rm -f /var/lock/subsys/blocksshd } # See how we were called. case "$1" in start) start ;; stop) stop ;; reload) $0 stop $0 start exit $? ;; status) status $DAEMON echo ;; *) echo "Usage: blocksshd {start|stop|reloadi|status}" exit 1 esac exit 0