source: freewrt/package/asterisk/files/asterisk.init@ 621d5d2

freewrt_2_0
Last change on this file since 621d5d2 was 5d9f1ed, checked in by Waldemar Brodkorb <wbx@…>, 19 years ago

more init script fixes

git-svn-id: svn://www.freewrt.org/branches/freewrt_1_0@1009 afb5a338-a214-0410-bd46-81f09a774fd1

  • Property mode set to 100644
File size: 493 bytes
Line 
1#!/bin/sh
2
3. /etc/rc.conf
4
5case $1 in
6autostart)
7 test x"${asterisk:-NO}" = x"NO" && exit 0
8 exec $0 start
9 ;;
10start)
11 [ -d /var/run ] || mkdir -p /var/run
12 [ -d /var/log/asterisk ] || mkdir -p /var/log/asterisk
13 [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
14 /usr/sbin/asterisk
15 ;;
16stop)
17 [ -f /var/run/asterisk.pid ] && kill $(cat /var/run/asterisk.pid) >/dev/null 2>&1
18 ;;
19restart)
20 $0 stop
21 $0 start
22 ;;
23*)
24 echo "usage: $0 {start | stop | restart}"
25 exit 1
26 ;;
27esac
28exit $?
Note: See TracBrowser for help on using the repository browser.