diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-19 06:52:09 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2011-04-19 09:18:46 +0000 |
commit | c99eef8cb1fde2cba4768857bb894610b30fd746 (patch) | |
tree | 7a1036476b533638cfc260f2b9b96fcc991fc61f /main/sems/sems.initd | |
parent | d74a067929c230b551de365a59a3293d94648d62 (diff) | |
download | aports-c99eef8cb1fde2cba4768857bb894610b30fd746.tar.bz2 aports-c99eef8cb1fde2cba4768857bb894610b30fd746.tar.xz |
main/sems: moved from testing
on request.
I think this still needs some work...
Diffstat (limited to 'main/sems/sems.initd')
-rw-r--r-- | main/sems/sems.initd | 37 |
1 files changed, 37 insertions, 0 deletions
diff --git a/main/sems/sems.initd b/main/sems/sems.initd new file mode 100644 index 0000000000..0e96f8a21a --- /dev/null +++ b/main/sems/sems.initd @@ -0,0 +1,37 @@ +#!/sbin/runscript +# SIP Express Media Server configuration file +# Follows Gentoo/AlpineLinux standards +# GPL 2 License - N. Angelacos 2011 + +CONFDIR="/etc/sems" +SVC="${SVCNAME#*.}" +if [ -n "${SVC}" ] && [ "${SVCNAME}" != "sems" ]; then + SEMSPID="/var/run/sems/${SVC}.pid" + else + SEMSPID="/var/run/sems/sems.pid" + fi +SEMSCONF="${CONFDIR}/${SVC}.conf" +daemon=/usr/sbin/sems + +depend() { + need net + after firewall +} + +start() { + ebegin "Starting ${SVCNAME}" + echo $SEMSPID $SEMSCONF + start-stop-daemon --start --quiet --pidfile $SEMSPID --exec $daemon \ + -- \ + -u sems \ + -g sems \ + -P $SEMSPID \ + -f $SEMSCONF + eend $? +} + +stop() { + ebegin "Stopping ${SVCNAME}" + start-stop-daemon --stop --quiet --pidfile $SEMSPID + eend $? +} |