diff options
author | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-11-03 10:00:06 +0000 |
---|---|---|
committer | Leonardo Arena <rnalrd@alpinelinux.org> | 2015-11-03 10:00:06 +0000 |
commit | e341338ef96a84f24f1fe7171235b97a8261e41c (patch) | |
tree | 40dae2d492afa5ae888852116ea1af9e0628ccfc /community/smstools/smstools.initd | |
parent | b13fd082726aae6d3a78b356157f72f0be6a48e1 (diff) | |
download | aports-e341338ef96a84f24f1fe7171235b97a8261e41c.tar.bz2 aports-e341338ef96a84f24f1fe7171235b97a8261e41c.tar.xz |
community/smstools: move from main
Diffstat (limited to 'community/smstools/smstools.initd')
-rw-r--r-- | community/smstools/smstools.initd | 30 |
1 files changed, 30 insertions, 0 deletions
diff --git a/community/smstools/smstools.initd b/community/smstools/smstools.initd new file mode 100644 index 0000000000..78383bc285 --- /dev/null +++ b/community/smstools/smstools.initd @@ -0,0 +1,30 @@ +#!/sbin/openrc-run +# 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 + + ebegin "Starting smsd" + start-stop-daemon -b -u smsd:smsd --start --exec /usr/sbin/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 ${?} +} |