From 059f52fdd844549e462e07d26e6c8ec636a5386b Mon Sep 17 00:00:00 2001 From: Michael Mason Date: Thu, 5 Mar 2009 21:05:16 +0000 Subject: testing/freeswitch Patch for initd and install scripts --- testing/freeswitch/freeswitch.initd | 19 +++++++++++++++++++ testing/freeswitch/freeswitch.install | 15 +++++++++++++++ 2 files changed, 34 insertions(+) create mode 100644 testing/freeswitch/freeswitch.initd create mode 100755 testing/freeswitch/freeswitch.install (limited to 'testing/freeswitch') diff --git a/testing/freeswitch/freeswitch.initd b/testing/freeswitch/freeswitch.initd new file mode 100644 index 00000000..34f44139 --- /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 00000000..0507fe53 --- /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 + -- cgit v1.2.3