summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorPaul Buetow <paul@buetow.org>2011-05-13 14:06:19 +0000
committerPaul Buetow <paul@buetow.org>2011-05-13 14:06:19 +0000
commit816031ccd4a0bf5e4a5e4fa8c28b9b68a3b71d40 (patch)
treedbc7082b3da9e2cbdca9de4799e7c003680c009c
parent55fe4f90e7f7b89abebbd53a4a910dc1e4dcd896 (diff)
./bin contains the start script
control.sh is just a wrapper
-rw-r--r--bin/perldaemon20
-rw-r--r--control.sh21
2 files changed, 22 insertions, 19 deletions
diff --git a/bin/perldaemon b/bin/perldaemon
new file mode 100644
index 0000000..0177798
--- /dev/null
+++ b/bin/perldaemon
@@ -0,0 +1,20 @@
+#!/bin/bash
+
+case $1 in
+ start)
+ perl PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf
+ ;;
+
+ stop)
+ kill $(cat ./run/perldaemon.pid)
+ ;;
+
+ logrotate)
+ kill -HUP $(cat ./run/perldaemon.pid)
+ ;;
+
+ *)
+ echo "Usage: $0 <start|stop|logrotate>"
+ exit 1
+ ;;
+esac
diff --git a/control.sh b/control.sh
index 0177798..dc80bf0 100644
--- a/control.sh
+++ b/control.sh
@@ -1,20 +1,3 @@
-#!/bin/bash
+#!/bin/sh
-case $1 in
- start)
- perl PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf
- ;;
-
- stop)
- kill $(cat ./run/perldaemon.pid)
- ;;
-
- logrotate)
- kill -HUP $(cat ./run/perldaemon.pid)
- ;;
-
- *)
- echo "Usage: $0 <start|stop|logrotate>"
- exit 1
- ;;
-esac
+exec ./bin/perldaemon $@