summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--bin/perldaemon14
l---------control1
2 files changed, 12 insertions, 3 deletions
diff --git a/bin/perldaemon b/bin/perldaemon
index d7b1792..3a66064 100644
--- a/bin/perldaemon
+++ b/bin/perldaemon
@@ -9,13 +9,21 @@ for path in ${LIBPATHS[@]}; do
fi
done
+start () perl -I$LIBDIR $LIBDIR/PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf
+stop () kill $(cat ./run/perldaemon.pid)
+
case $1 in
start)
- perl -I$LIBDIR $LIBDIR/PerlDaemon/PerlDaemon.pl ./conf/perldaemon.conf
+ start
;;
stop)
- kill $(cat ./run/perldaemon.pid)
+ stop
+ ;;
+
+ restart)
+ stop
+ start
;;
logrotate)
@@ -23,7 +31,7 @@ case $1 in
;;
*)
- echo "Usage: $0 <start|stop|logrotate>"
+ echo "Usage: $0 <start|stop|restart|logrotate>"
exit 1
;;
esac
diff --git a/control b/control
new file mode 120000
index 0000000..187e168
--- /dev/null
+++ b/control
@@ -0,0 +1 @@
+bin/perldaemon \ No newline at end of file