summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
Diffstat (limited to 'app-mobilephone/smstools/files/smsd.initd3')
-rw-r--r--app-mobilephone/smstools/files/smsd.initd331
1 files changed, 31 insertions, 0 deletions
diff --git a/app-mobilephone/smstools/files/smsd.initd3 b/app-mobilephone/smstools/files/smsd.initd3
new file mode 100644
index 000000000000..1f585946a448
--- /dev/null
+++ b/app-mobilephone/smstools/files/smsd.initd3
@@ -0,0 +1,31 @@
+#!/sbin/runscript
+# Copyright 1999-2012 Gentoo Foundation
+# Distributed under the terms of the GNU General Public License v2
+# $Id$
+
+depend() {
+ need localmount
+}
+
+start() {
+ if ! [ -d /var/run/smsd ]; then
+ ebegin "Creating /var/run/smsd for ${SVCNAME}"
+ mkdir /var/run/smsd \
+ && chown smsd:sms /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:sms --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 ${?}
+}