~alpine/devel

testing/sems/sems.initd: allow multiple sems instances v1 PROPOSED

Nathan Angelacos: 1
 testing/sems/sems.initd: allow multiple sems instances

 1 files changed, 18 insertions(+), 8 deletions(-)
Export patchset (mbox)
How do I use this?

Copy & paste the following snippet into your terminal to import this patchset into git:

curl -s https://lists.alpinelinux.org/~alpine/devel/patches/302/mbox | git am -3
Learn more about email & git

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

---
 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
---