i think ATM is right
[openwrt.git] / package / asterisk / files / asterisk.init
1 #!/bin/sh
2
3 DEFAULT=/etc/default/asterisk
4 OPTIONS=""
5 [ -f $DEFAULT ] && . $DEFAULT
6 [ "$ENABLE_ASTERISK" = "yes" ] || exit 0
7
8 case $1 in
9 start)
10 [ -d /var/run ] || mkdir -p /var/run
11 [ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
12 [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
13 /usr/sbin/asterisk $OPTIONS
14 ;;
15 stop)
16 [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
17 ;;
18 *)
19 echo "usage: $0 (start|stop)"
20 exit 1
21 esac
22
23 exit $?
This page took 0.049716 seconds and 5 git commands to generate.