summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'www-servers/webcit/files/webcit.init.d')
-rw-r--r--www-servers/webcit/files/webcit.init.d29
1 files changed, 29 insertions, 0 deletions
diff --git a/www-servers/webcit/files/webcit.init.d b/www-servers/webcit/files/webcit.init.d
new file mode 100644
index 000000000..8d687c38c
--- /dev/null
+++ b/www-servers/webcit/files/webcit.init.d
@@ -0,0 +1,29 @@
+#!/sbin/runscript
+# Copyright 1999-2005 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: $
+
+depend() {
+ need net
+}
+
+svc_start() {
+ ebegin "Starting WebCit"
+ start-stop-daemon --start --quiet --background \
+ --exec /usr/sbin/webcit -- $WEBCIT_OPTS
+ eend $? "Failed to start WebCit"
+}
+
+svc_stop() {
+ ebegin "Stopping WebCit"
+ start-stop-daemon --stop --quiet \
+ --exec /usr/sbin/webcit
+ eend $? "Failed to stop WebCit"
+}
+
+restart() {
+ ebegin "Restarting WebCit"
+ svc_stop && sleep 3 && svc_start
+ eend $? "Failed to restart WebCit"
+}
+