#!/bin/bash # # chkconfig: 235 23 77 # description: portsentry2 # # Source function library. . /etc/rc.d/init.d/functions # path to the binary. portsentry=/usr/local/portsentry2/portsentry # See how we were called case "$1" in start) echo -n "Starting portsentry:" daemon $portsentry echo ;; stop) echo -n "Stopping portsentry:" killproc $portsentry echo ;; status) status $portsentry ;; restart) $0 stop $0 start ;; *) echo "Usage:$0{ start|stop|restart|status }" exit 1 esac exit 0