aboutsummaryrefslogtreecommitdiffstats
path: root/main/freeswitch/freeswitch.initd
diff options
context:
space:
mode:
authorCarlo Landmeter <clandmeter@gmail.com>2010-05-08 10:52:54 +0000
committerCarlo Landmeter <clandmeter@gmail.com>2010-05-08 10:52:54 +0000
commitd11f31e81a96681f8b74c6bb8d6dfe43a62f1147 (patch)
tree5584de5036910e0896327d4514d72cf8cc445924 /main/freeswitch/freeswitch.initd
parent9f050562e98e9355710fa2aa173dae037793fb37 (diff)
downloadaports-d11f31e81a96681f8b74c6bb8d6dfe43a62f1147.tar.bz2
aports-d11f31e81a96681f8b74c6bb8d6dfe43a62f1147.tar.xz
main/freeswitch: changed locations to partially support FHS
Diffstat (limited to 'main/freeswitch/freeswitch.initd')
-rwxr-xr-xmain/freeswitch/freeswitch.initd39
1 files changed, 32 insertions, 7 deletions
diff --git a/main/freeswitch/freeswitch.initd b/main/freeswitch/freeswitch.initd
index 84381d7711..0538fff56b 100755
--- a/main/freeswitch/freeswitch.initd
+++ b/main/freeswitch/freeswitch.initd
@@ -7,27 +7,52 @@ depend() {
need net
}
+opts="reload"
+
start() {
local OPTS
[ -n "${FREESWITCH_USER}" ] && \
- OPTS="${OPTS} -u ${FREESWITCH_USER}"
+ OPTS="${OPTS} -u ${FREESWITCH_USER}"
[ -n "${FREESWITCH_GROUP}" ] && \
- OPTS="${OPTS} -g ${FREESWITCH_GROUP}"
+ OPTS="${OPTS} -g ${FREESWITCH_GROUP}"
[ -n "${FREESWITCH_OPTS}" ] && \
- OPTS="${OPTS} ${FREESWITCH_OPTS}"
+ OPTS="${OPTS} ${FREESWITCH_OPTS}"
- ebegin "Starting Freeswitch"
+ ebegin "Starting Freeswitch"
+ limits
start-stop-daemon --start --quiet --exec /usr/bin/freeswitch \
- --pidfile /var/run/freeswitch.pid -- -nc ${OPTS}
+ -- -nc -conf /etc/freeswitch -log /var/log/freeswitch \
+ -run /var/run/freeswitch -db /var/lib/freeswitch/db \
+ -htdocs /usr/share/freeswitch/htdocs \
+ -scripts /usr/share/freeswitch/scripts ${OPTS}
eend $?
}
+# Recomended ULIMIT settings
+# http://tinyurl.com/2dr467l (i,q,u,x not suppoted)
+
+limits() {
+ ulimit -c unlimited
+ ulimit -d unlimited
+ ulimit -f unlimited
+ ulimit -n 999999
+ ulimit -v unlimited
+ ulimit -s 244
+ ulimit -l unlimited
+}
+
stop() {
- ebegin "Stopping Freeswitch"
- start-stop-daemon --stop --quiet --pidfile /var/run/freeswitch.pid
+ ebegin "Stopping Freeswitch"
+ /usr/bin/freeswitch -stop
eend $?
}
+reload() {
+ start-stop-daemon --stop --signal 1 --quiet --pidfile \
+ /var/run/freeswitch.pid --name freeswitch
+ return 0
+}
+