forked from danmia/pcapdaemon
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Dan Murphy
committed
Sep 23, 2016
1 parent
a0ab54a
commit 7ccb8a5
Showing
1 changed file
with
53 additions
and
0 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
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 |