testing/freeswitch Patch for initd and install scripts

This commit is contained in:
Michael Mason 2009-03-05 21:05:16 +00:00 committed by Natanael Copa
parent 09218f0553
commit 059f52fdd8
2 changed files with 34 additions and 0 deletions

View File

@ -0,0 +1,19 @@
#!/sbin/runscript
NAME=freeswitch
USER=freeswitch
DAEMON=/usr/bin/freeswitch
OPTIONS_START="-u $USER -g $GROUP -nc"
OPTIONS_STOP="-stop"
start() {
ebegin "Starting $NAME"
$DAEMON $OPTIONS_START
eend 0
}
stop() {
ebegin "Stopping $NAME"
$DAEMON $OPTIONS_STOP
eend 0
}

View File

@ -0,0 +1,15 @@
#!/bin/sh
case "$1" in
pre_install)
adduser -h /dev/null -s /bin/false -D freeswitch 2>/dev/null
;;
post_install)
chown -R freeswitch:freeswitch /etc/freeswitch/
;;
post_deinstall)
deluser freeswitch
delgroup freeswitch
;;
esac