Skip to content

Commit

Permalink
added init script for centos6
Browse files Browse the repository at this point in the history
  • Loading branch information
Dan Murphy committed Sep 23, 2016
1 parent a0ab54a commit 7ccb8a5
Showing 1 changed file with 53 additions and 0 deletions.
53 changes: 53 additions & 0 deletions inits/pcapdaemon.centos6
Original file line number Diff line number Diff line change
@@ -0,0 +1,53 @@
#!/bin/sh
#
# pcapdaemon: PCAP Capture Daemon
#
# chkconfig: 2345 97 06
# description: PCAP Daemon
#
#

# Source function library.
. /etc/rc.d/init.d/functions




start()
{

echo -n $"Starting pcapdaemon: "
daemon /usr/sbin/daemonize -p /var/run/pcapdaemon.pid -l /var/run/pcapdaemon.pid /usr/local/bin/pcapdaemon -config /etc/pcapdaemon.conf

echo
}

stop()
{
echo -n $"Shutting down pcapdaemon: "
killproc pcapdaemon

echo
}

# See how we were called.
case "$1" in
start)
start
;;
stop)
stop
;;
restart|reload)
stop
start
;;
status)
status pcapdaemon
;;
*)
echo $"Usage: $0 {start|stop|restart|reload}"
exit 1
esac

exit 0

0 comments on commit 7ccb8a5

Please sign in to comment.