~alpine/devel

This thread contains a patchset. You're looking at the original emails, but you may wish to use the patch review UI. Review patch

[alpine-devel] [PATCH] testing/sems/sems.initd: allow multiple sems instances

Nathan Angelacos <nangel@alpinelinux.org>
Details
Message ID
<1302240530-3153-1-git-send-email-nangel@alpinelinux.org>
Sender timestamp
1302240530
DKIM signature
missing
Download raw message
Patch: +18 -8
---
 testing/sems/sems.initd |   26 ++++++++++++++++++--------
 1 files changed, 18 insertions(+), 8 deletions(-)

diff --git a/testing/sems/sems.initd b/testing/sems/sems.initd
index 9cf98a1..0e96f8a 100644
--- a/testing/sems/sems.initd
+++ b/testing/sems/sems.initd
@@ -1,8 +1,17 @@
#!/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
pidfile=/var/run/sems/sems.pid
conffile=/etc/sems/sems.conf

depend() {
	need net
@@ -10,18 +19,19 @@ depend() {
}

start() {
	ebegin "Starting sems"
	start-stop-daemon --start --quiet --pidfile $pidfile --exec $daemon \
	ebegin "Starting  ${SVCNAME}"
	echo $SEMSPID   $SEMSCONF
	start-stop-daemon --start --quiet --pidfile $SEMSPID --exec $daemon \
		-- \
		-u sems \
		-g sems \
		-P $pidfile \
		-f $conffile
		-P $SEMSPID \
		-f $SEMSCONF
	eend $?
}

stop() {
	ebegin "Stopping sems"
	start-stop-daemon --stop --quiet --pidfile $pidfile
	ebegin "Stopping  ${SVCNAME}"
	start-stop-daemon --stop --quiet --pidfile $SEMSPID
	eend $?
}
-- 
1.7.4.2



---
Unsubscribe:  alpine-devel+unsubscribe@lists.alpinelinux.org
Help:         alpine-devel+help@lists.alpinelinux.org
---
Reply to thread Export thread (mbox)