summaryrefslogtreecommitdiffstats
path: root/main/smstools/smstools.initd
diff options
context:
space:
mode:
authorLeonardo Arena <rnalrd@alpinelinux.org>2013-04-24 09:47:35 +0000
committerLeonardo Arena <rnalrd@alpinelinux.org>2013-04-24 09:47:35 +0000
commit89fbf7e6c7eee8b7603e2ffe082f092d8a5e71c3 (patch)
tree528451cdef5319de2981422e84eca9d625cd335f /main/smstools/smstools.initd
parent2246b6e3947960727670ba5e00e5c5a31f1df300 (diff)
downloadaports-89fbf7e6c7eee8b7603e2ffe082f092d8a5e71c3.tar.bz2
aports-89fbf7e6c7eee8b7603e2ffe082f092d8a5e71c3.tar.xz
testing/smstools: move to main
Diffstat (limited to 'main/smstools/smstools.initd')
-rw-r--r--main/smstools/smstools.initd31
1 files changed, 31 insertions, 0 deletions
diff --git a/main/smstools/smstools.initd b/main/smstools/smstools.initd
new file mode 100644
index 000000000..44f707a80
--- /dev/null
+++ b/main/smstools/smstools.initd
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Header: /var/cvsroot/gentoo-x86/app-mobilephone/smstools/files/smsd.initd3,v 1.1 2012/12/20 10:41:42 chainsaw Exp $
+
+depend() {
+ need localmount
+}
+
+start() {
+ if ! [ -d /var/run/smsd ]; then
+ ebegin "Creating /var/run/smsd for ${SVCNAME}"
+ mkdir /var/run/smsd \
+ && chown smsd:smsd /var/run/smsd \
+ && chmod 770 /var/run/smsd
+ eend $?
+ fi
+
+ chown smsd:sms /var/log/smsd.log
+ ebegin "Starting smsd"
+ start-stop-daemon -b -u smsd:smsd --start --exec /usr/bin/smsd -- \
+ -c /etc/smsd.conf -p /var/run/smsd/smsd.pid \
+ -i /var/run/smsd/smsd.working
+ eend ${?}
+}
+
+stop() {
+ ebegin "Stopping smsd"
+ start-stop-daemon --stop -n smsd
+ eend ${?}
+}