diff options
-rw-r--r-- | testing/freeswitch/freeswitch.initd | 19 | ||||
-rwxr-xr-x | testing/freeswitch/freeswitch.install | 15 |
2 files changed, 34 insertions, 0 deletions
diff --git a/testing/freeswitch/freeswitch.initd b/testing/freeswitch/freeswitch.initd new file mode 100644 index 000000000..34f441390 --- /dev/null +++ b/testing/freeswitch/freeswitch.initd @@ -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 + } diff --git a/testing/freeswitch/freeswitch.install b/testing/freeswitch/freeswitch.install new file mode 100755 index 000000000..0507fe532 --- /dev/null +++ b/testing/freeswitch/freeswitch.install @@ -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 + |