2006-10-15 21:03:30 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2007-05-10 10:38:53 +00:00
|
|
|
START=50
|
2006-10-07 11:36:58 +00:00
|
|
|
|
|
|
|
DEFAULT=/etc/default/asterisk
|
2007-09-11 06:37:56 +00:00
|
|
|
DEST=
|
|
|
|
OPTIONS=
|
2006-10-07 11:36:58 +00:00
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
start() {
|
|
|
|
[ -f $DEFAULT ] && . $DEFAULT
|
2007-09-11 06:37:56 +00:00
|
|
|
mkdir -p $DEST/var/run
|
|
|
|
mkdir -p $DEST/var/log/asterisk
|
|
|
|
mkdir -p $DEST/var/spool/asterisk
|
|
|
|
[ -f $DEST/usr/lib/asterisk/astdb ] && mv $DEST/usr/lib/asterisk/astdb $DEST/var/spool/asterisk/
|
|
|
|
[ -h $DEST/usr/lib/asterisk/astdb ] || ln -sf $DEST/var/spool/asterisk/astdb $DEST/usr/lib/asterisk/
|
2006-10-15 21:03:30 +00:00
|
|
|
/usr/sbin/asterisk $OPTIONS
|
|
|
|
}
|
2006-10-07 11:36:58 +00:00
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
stop() {
|
2007-09-11 06:37:56 +00:00
|
|
|
[ -f $DEST/var/run/asterisk.pid ] && kill $(cat $DEST/var/run/asterisk.pid) >/dev/null 2>&1
|
2006-10-15 21:03:30 +00:00
|
|
|
}
|