aboutsummaryrefslogtreecommitdiffstats
path: root/testing/kannel/kannel-smsbox.initd
diff options
context:
space:
mode:
authorFrancesco Colista <fcolista@alpinelinux.org>2015-07-29 11:45:38 +0000
committerFrancesco Colista <fcolista@alpinelinux.org>2015-07-29 11:45:43 +0000
commitcea1479d55a6f1246704c6ba12358d78c076d47a (patch)
tree793a7be14ed0b57362c67dd4d378758a26be5a9e /testing/kannel/kannel-smsbox.initd
parentd4f9e959e4cd7a6ecdaf50356b364758b0e0a5f8 (diff)
downloadaports-cea1479d55a6f1246704c6ba12358d78c076d47a.tar.bz2
aports-cea1479d55a6f1246704c6ba12358d78c076d47a.tar.xz
testing/kannel: new aport
Diffstat (limited to 'testing/kannel/kannel-smsbox.initd')
-rw-r--r--testing/kannel/kannel-smsbox.initd34
1 files changed, 34 insertions, 0 deletions
diff --git a/testing/kannel/kannel-smsbox.initd b/testing/kannel/kannel-smsbox.initd
new file mode 100644
index 0000000000..b5b8356bd3
--- /dev/null
+++ b/testing/kannel/kannel-smsbox.initd
@@ -0,0 +1,34 @@
+#!/sbin/openrc-run
+# Copyright 1999-2009 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/kannel/files/kannel-smsbox.initd,v 1.1 2009/09/25 01:20:06 mrness Exp $
+
+KANNEL_SERVICE=${SVCNAME#*-}
+
+depend() {
+ need kannel-bearerbox
+}
+
+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/kannel.conf
+ eend $?
+}
+
+stop() {
+ ebegin "Stopping kannel ${KANNEL_SERVICE}"
+ start-stop-daemon --stop --verbose --pidfile /var/run/kannel/${KANNEL_SERVICE}.pid
+ eend $?
+}
+