aports/testing/rtpengine/rtpengine.initd
Leonardo Arena 809ed38027 testing/rtpengine: improve init.d
Fix kamailio dependency
2020-11-06 13:47:01 +00:00

18 lines
375 B
Plaintext
Executable File

#!/sbin/openrc-run
command="/usr/bin/${RC_SVCNAME}"
command_args="--foreground --config-file /etc/rtpengine/${RC_SVCNAME}.conf"
command_background="yes"
: ${command_user:="rtpengine:rtpengine"}
pidfile="/run/rtpengine/${RC_SVCNAME}.pid"
depend() {
need net
after firewall
before kamailio
}
start_pre() {
checkpath --directory --owner "$command_user" "${pidfile%/*}"
}