diff --git a/testing/freeswitch/freeswitch.initd b/testing/freeswitch/freeswitch.initd new file mode 100644 index 00000000000..34f44139069 --- /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 00000000000..0507fe532f8 --- /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 +