source: packages/net/asterisk-1.6.x/files/asterisk.init @ 14304

Last change on this file since 14304 was 14304, checked in by zandbelt, 8 years ago

add basic asterisk 1.6.x package based on 1.6.1-rc1

File size: 664 bytes
Line 
1#!/bin/sh /etc/rc.common
2# Copyright (C) 2008 OpenWrt.org
3START=50
4
5DEST=
6DEFAULT=$DEST/etc/default/asterisk
7OPTIONS=""
8
9start() {
10        [ -f $DEFAULT ] && . $DEFAULT
11        [ -d $DEST/var/run ] || mkdir -p $DEST/var/run
12        [ -d $DEST/var/log/asterisk ] || mkdir -p $DEST/var/log/asterisk
13        [ -d $DEST/var/spool/asterisk ] || mkdir -p $DEST/var/spool/asterisk
14        [ -d /var/spool/asterisk ] || mkdir -p /var/spool/asterisk
15        [ -h $DEST/usr/lib/asterisk/astdb ] || ln -sf /var/spool/asterisk/astdb $DEST/usr/lib/asterisk/astdb
16        $DEST/usr/sbin/asterisk $OPTIONS
17}
18
19stop() {
20        [ -f $DEST/var/run/asterisk.pid ] && kill $(cat $DEST/var/run/asterisk.pid) >/dev/null 2>&1
21}
Note: See TracBrowser for help on using the repository browser.