packages/net/kamailio/files/kamailio.init
nico 2a95010859 [packages] add kamailio (former openser)
git-svn-id: svn://svn.openwrt.org/openwrt/packages@17841 3c298f89-4303-0410-b956-a3cf2f4a3e73
2009-10-03 23:29:30 +00:00

20 lines
296 B
Bash
Executable File

#!/bin/sh /etc/rc.common
# Copyright (C) 2009 OpenWrt.org
START=50
BIN=kamailio
DEFAULT=/etc/default/$BIN
RUN_D=/var/run
PID_F=$RUN_D/$BIN.pid
start() {
[ -f $DEFAULT ] && . $DEFAULT
mkdir -p $RUN_D
$BIN -P $PID_F $OPTIONS >/dev/null 2>&1
}
stop() {
[ -f $PID_F ] && kill $(cat $PID_F)
}