packages/net/kamailio/files/kamailio.init

20 lines
296 B
Plaintext
Raw Normal View History

#!/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)
}