forked from cms-sw/cmssw
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
A new version of the fff deletion daemon.
Now includes a startup script.
- Loading branch information
Dmitrijus Bugelskis
committed
Aug 13, 2014
1 parent
05ed6ce
commit 9e26670
Showing
2 changed files
with
204 additions
and
14 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,69 @@ | ||
#!/bin/bash | ||
# | ||
# /etc/rc.d/init.d/fff_deleter | ||
# | ||
# Init file for fff_deleter.py | ||
# Copy it to /etc/rc.d/init.d/fff_deleter | ||
# | ||
# chkconfig: 345 80 20 | ||
# description: FFF Deletion daemon for DQM | ||
|
||
# Source function library. | ||
. /etc/rc.d/init.d/functions | ||
|
||
DAEMON_BIN=/usr/local/bin/fff_deleter.py | ||
PIDFILE=/var/run/fff_deleter.pid | ||
RETVAL=0 | ||
|
||
start() { | ||
echo -n $"Starting fff_deleter daemon: " | ||
daemon $DAEMON_BIN | ||
RETVAL=$? | ||
echo | ||
|
||
return $RETVAL | ||
} | ||
|
||
stop() { | ||
echo -n $"Stopping fff_deleter daemon: " | ||
killproc -p $PIDFILE | ||
RETVAL=$? | ||
echo | ||
|
||
return $RETVAL | ||
} | ||
|
||
|
||
restart() { | ||
stop | ||
start | ||
} | ||
|
||
case "$1" in | ||
start) | ||
start | ||
;; | ||
stop) | ||
stop | ||
;; | ||
reload) | ||
echo "$0: Unimplemented feature." | ||
RETVAL=3 | ||
;; | ||
force-reload) | ||
echo "$0: Unimplemented feature." | ||
RETVAL=3 | ||
;; | ||
restart) | ||
restart | ||
;; | ||
status) | ||
status acpid | ||
RETVAL=$? | ||
;; | ||
*) | ||
echo $"Usage: $0 {start|stop|status|restart}" | ||
RETVAL=2 | ||
esac | ||
|
||
exit $RETVAL |
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