diff options
author | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-23 14:35:55 +0000 |
---|---|---|
committer | Natanael Copa <ncopa@alpinelinux.org> | 2010-04-23 14:36:50 +0000 |
commit | 15d5070c984e5d206de86a34831ae25e396f7a3b (patch) | |
tree | 914d663f8f37bd4429c822b76856cc65399718f5 /main/freeswitch/freeswitch.initd | |
parent | a8865bca760dc6b1ac64b8bb8dacbf75e6d69847 (diff) | |
download | aports-15d5070c984e5d206de86a34831ae25e396f7a3b.tar.bz2 aports-15d5070c984e5d206de86a34831ae25e396f7a3b.tar.xz |
main/freeswitch: moved from testing
Diffstat (limited to 'main/freeswitch/freeswitch.initd')
-rwxr-xr-x | main/freeswitch/freeswitch.initd | 33 |
1 files changed, 33 insertions, 0 deletions
diff --git a/main/freeswitch/freeswitch.initd b/main/freeswitch/freeswitch.initd new file mode 100755 index 0000000000..84381d7711 --- /dev/null +++ b/main/freeswitch/freeswitch.initd @@ -0,0 +1,33 @@ +#!/sbin/runscript +# Copyright 2007 Gentoo Foundation +# Distributed under the terms of the GNU General Public License, v2 or later +# $Header: $ + +depend() { + need net +} + +start() { + local OPTS + + [ -n "${FREESWITCH_USER}" ] && \ + OPTS="${OPTS} -u ${FREESWITCH_USER}" + + [ -n "${FREESWITCH_GROUP}" ] && \ + OPTS="${OPTS} -g ${FREESWITCH_GROUP}" + + [ -n "${FREESWITCH_OPTS}" ] && \ + OPTS="${OPTS} ${FREESWITCH_OPTS}" + + ebegin "Starting Freeswitch" + start-stop-daemon --start --quiet --exec /usr/bin/freeswitch \ + --pidfile /var/run/freeswitch.pid -- -nc ${OPTS} + eend $? +} + +stop() { + ebegin "Stopping Freeswitch" + start-stop-daemon --stop --quiet --pidfile /var/run/freeswitch.pid + eend $? +} + |