summaryrefslogtreecommitdiff
path: root/app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd
diff options
context:
space:
mode:
Diffstat (limited to 'app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd')
-rw-r--r--app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd33
1 files changed, 33 insertions, 0 deletions
diff --git a/app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd b/app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd
new file mode 100644
index 000000000000..fd270e65e544
--- /dev/null
+++ b/app-mobilephone/kannel-sqlbox/files/kannel-sqlbox.initd
@@ -0,0 +1,33 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+
+KANNEL_SERVICE=${SVCNAME#*-}
+
+depend() {
+ need kannel-bearerbox
+ before kannel-smsbox
+}
+
+checkconfig() {
+ if [ ! -f /etc/kannel/kannel.conf ] ; then
+ eerror "/etc/kannel/kannel.conf file doesn't exists!"
+ return 1
+ fi
+}
+
+start() {
+ checkconfig || return 1
+
+ ebegin "Starting kannel ${KANNEL_SERVICE}"
+ start-stop-daemon --start --quiet --exec /usr/sbin/${KANNEL_SERVICE} -- \
+ --daemonize --user kannel --logfile /var/log/kannel/${KANNEL_SERVICE}.log \
+ --pid-file /var/run/kannel/${KANNEL_SERVICE}.pid /etc/kannel/sqlbox.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kannel ${KANNEL_SERVICE}"
+ start-stop-daemon --stop --verbose --pidfile /var/run/kannel/${KANNEL_SERVICE}.pid
+ eend $?
+}