summaryrefslogtreecommitdiff
path: root/packages/ccxstream/ccxstream-1.0.15/ccxstream.init
diff options
context:
space:
mode:
Diffstat (limited to 'packages/ccxstream/ccxstream-1.0.15/ccxstream.init')
-rw-r--r--packages/ccxstream/ccxstream-1.0.15/ccxstream.init37
1 files changed, 37 insertions, 0 deletions
diff --git a/packages/ccxstream/ccxstream-1.0.15/ccxstream.init b/packages/ccxstream/ccxstream-1.0.15/ccxstream.init
new file mode 100644
index 0000000000..f57752825d
--- /dev/null
+++ b/packages/ccxstream/ccxstream-1.0.15/ccxstream.init
@@ -0,0 +1,37 @@
+#! /bin/sh
+
+start() {
+ . /etc/ccxstream.conf
+ if [ "${CHECK}" = "YES" ] ; then
+
+ echo -n "Starting ccXstream : "
+ start-stop-daemon --start --quiet --exec ${BIN} \
+ -- ${PARAMS} -C ${SERVERCOMMENT}
+ status="$?"
+ test ${status} = "0" && echo OK || echo FAILED
+ return ${status}
+ else
+ echo "Please setup /etc/ccxstream.conf before starting ccXstream"
+ return 1
+ fi
+}
+
+stop() {
+ echo -n "Stopping ccXstream : "
+ start-stop-daemon --stop --quiet --pidfile /var/run/ccxstream.pid
+ return $?
+}
+
+case $1 in
+ start)
+ start
+ ;;
+ stop)
+ stop
+ ;;
+ restart)
+ stop
+ start
+ ;;
+esac
+