2006-10-15 21:03:30 +00:00
|
|
|
#!/bin/sh /etc/rc.common
|
|
|
|
# Copyright (C) 2006 OpenWrt.org
|
2006-10-07 11:36:58 +00:00
|
|
|
|
|
|
|
DEFAULT=/etc/default/asterisk
|
|
|
|
OPTIONS=""
|
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
start() {
|
|
|
|
[ -f $DEFAULT ] && . $DEFAULT
|
|
|
|
[ -d /var/run ] || mkdir -p /var/run
|
|
|
|
[ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
|
|
|
|
[ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
|
|
|
|
/usr/sbin/asterisk $OPTIONS
|
|
|
|
}
|
2006-10-07 11:36:58 +00:00
|
|
|
|
2006-10-15 21:03:30 +00:00
|
|
|
stop() {
|
|
|
|
[ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
|
|
|
|
}
|