diff options
| author | Paul Buetow <paul@buetow.org> | 2011-02-06 11:02:18 +0000 |
|---|---|---|
| committer | Paul Buetow <paul@buetow.org> | 2011-02-06 11:02:18 +0000 |
| commit | 5e843d61702c967748dfa9c84860152113831542 (patch) | |
| tree | 7bd6c50c07f8efc3c465dd806568496d24be5980 /control.sh | |
| parent | ef8d41048c51078ad27ee2f29d0e667073aeee98 (diff) | |
added control.sh which includes
start, stop and logrotate
removed obsolete start.sh and stop.sh scripts
logrotating now works in perldaemon.pl
Diffstat (limited to 'control.sh')
| -rw-r--r-- | control.sh | 20 |
1 files changed, 20 insertions, 0 deletions
diff --git a/control.sh b/control.sh new file mode 100644 index 0000000..346f736 --- /dev/null +++ b/control.sh @@ -0,0 +1,20 @@ +#!/bin/bash + +case $1 in + start) + perl perldaemon.pl perldaemon.conf + ;; + + stop) + kill $(cat perldaemon.pid) + ;; + + logrotate) + kill -HUP $(cat perldaemon.pid) + ;; + + *) + echo "Usage: $0 <start|stop|logrotate>" + exit 1 + ;; +esac |
