blob: 76cb49ac52526babf58efbe41f332d20d7397dbd (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
|
#!/sbin/openrc-run
# Copyright 1999-2016 Gentoo Foundation
# Distributed under the terms of the GNU General Public License v2
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
checkpath -o root:kannel -m 0770 -d /var/run/kannel
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 $?
}
|