summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorKoen Kooi <koen@openembedded.org>2007-08-08 19:39:49 +0000
committerKoen Kooi <koen@openembedded.org>2007-08-08 19:39:49 +0000
commita18fd36259159c1e74fb39a4d4e3f286ba3f3753 (patch)
tree174cbfb09e780b9ac4717254bb68d27ec1fe1513
parent15fffdbd68b6cb110e7cb215a6f288cc7b8880b3 (diff)
asterisk: add missing files
-rw-r--r--packages/asterisk/asterisk-1.4.7/init77
-rw-r--r--packages/asterisk/asterisk-1.4.7/logrotate12
-rw-r--r--packages/asterisk/asterisk-1.4.7/volatiles7
3 files changed, 96 insertions, 0 deletions
diff --git a/packages/asterisk/asterisk-1.4.7/init b/packages/asterisk/asterisk-1.4.7/init
new file mode 100644
index 0000000000..f26ad38db3
--- /dev/null
+++ b/packages/asterisk/asterisk-1.4.7/init
@@ -0,0 +1,77 @@
+#! /bin/sh
+#
+# This is an init script for openembedded
+# Copy it to /etc/init.d/openpbx and type
+# > update-rc.d asterisk defaults 60
+#
+asterisk=/usr/sbin/asterisk
+pidfile=/var/run/asterisk/asterisk.pid
+asterisk_args="-npqT -U asterisk -G asterisk"
+
+test -x "$asterisk" || exit 0
+
+case "$1" in
+ start)
+ echo -n "Starting Asterisk"
+ start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args
+ echo "."
+ ;;
+ stop)
+ echo -n "Stopping Asterisk"
+ $asterisk -rx "stop gracefully"
+ sleep 4
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ fi
+ echo "."
+ ;;
+ force-stop)
+ echo -n "Stopping Asterisk"
+ $asterisk -rx "stop now"
+ sleep 2
+ if [ -f $pidfile ]; then
+ start-stop-daemon --stop --quiet --pidfile $pidfile
+ fi
+ echo "."
+ ;;
+ restart)
+ echo -n "Restarting Asterisk"
+ if [ -f $pidfile ]; then
+ $asterisk -rx "restart gracefully"
+ sleep 2
+ else
+ start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args
+ fi
+ echo "."
+ ;;
+ force-restart)
+ echo -n "Forcibly Restarting Asterisk"
+ if [ -f $pidfile ]; then
+ $asterisk -rx "restart now"
+ sleep 2
+ else
+ start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args
+ fi
+ echo "."
+ ;;
+ reload)
+ echo -n "Reloading Asterisk Configuration"
+ if [ -f $pidfile ]; then
+ $asterisk -rx "reload"
+ else
+ start-stop-daemon --start --quiet --exec $asterisk -- $asterisk_args
+ fi
+ echo "."
+ ;;
+ logger-reload)
+ if [ -f $pidfile ]; then
+ $asterisk -rx "logger reload"
+ fi
+ ;;
+ *)
+ echo "Usage: /etc/init.d/asterisk {start|stop|force-stop|restart|force-restart|reload|logger-reload}"
+ exit 1
+esac
+
+exit 0
+
diff --git a/packages/asterisk/asterisk-1.4.7/logrotate b/packages/asterisk/asterisk-1.4.7/logrotate
new file mode 100644
index 0000000000..dfd25ee55c
--- /dev/null
+++ b/packages/asterisk/asterisk-1.4.7/logrotate
@@ -0,0 +1,12 @@
+/var/log/asterisk/cdr-csv/Master.csv /var/log/asterisk/cdr-custom/Master.csv /var/log/asterisk/queue_log /var/log/asterisk/event_log /var/log/asterisk/messages {
+ daily
+ missingok
+ compress
+ delaycompress
+ rotate 30
+ sharedscripts
+ postrotate
+ /etc/init.d/asterisk logger-reload
+ endscript
+}
+
diff --git a/packages/asterisk/asterisk-1.4.7/volatiles b/packages/asterisk/asterisk-1.4.7/volatiles
new file mode 100644
index 0000000000..c68e786c90
--- /dev/null
+++ b/packages/asterisk/asterisk-1.4.7/volatiles
@@ -0,0 +1,7 @@
+d asterisk asterisk 0775 /var/run/asterisk none
+d asterisk asterisk 0775 /var/lib/asterisk none
+d asterisk asterisk 0775 /var/log/asterisk none
+d asterisk asterisk 0775 /var/log/asterisk/cdr-csv none
+d asterisk asterisk 0775 /var/log/asterisk/cdr-custom none
+d asterisk asterisk 0775 /var/spool/asterisk/outgoing none
+d asterisk asterisk 0775 /var/spool/asterisk/voicemail none