summaryrefslogtreecommitdiffstats
path: root/testing/freeswitch
diff options
context:
space:
mode:
authorMichael Mason <ms13sp@gmail.com>2009-03-05 21:05:16 +0000
committerNatanael Copa <ncopa@alpinelinux.org>2009-03-06 14:49:31 +0000
commit059f52fdd844549e462e07d26e6c8ec636a5386b (patch)
treefcf12f2e0985379c6397ef29bc442656b0411383 /testing/freeswitch
parent09218f0553ff210a9776578d86458a9241fac1d0 (diff)
downloadaports-059f52fdd844549e462e07d26e6c8ec636a5386b.tar.bz2
aports-059f52fdd844549e462e07d26e6c8ec636a5386b.tar.xz
testing/freeswitch Patch for initd and install scripts
Diffstat (limited to 'testing/freeswitch')
-rw-r--r--testing/freeswitch/freeswitch.initd19
-rwxr-xr-xtesting/freeswitch/freeswitch.install15
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
+