packages/net/yggdrasil/files/yggdrasil.init
William Fleurant 9436ff4261 yggdrasil: properly call the daemon with procd
Signed-off-by: William Fleurant <meshnet@protonmail.com>
2019-08-09 09:57:31 +08:00

34 lines
480 B
Bash
Executable file

#!/bin/sh /etc/rc.common
START=90
STOP=85
USE_PROCD=1
start_service()
{
[ -f /etc/uci-defaults/yggdrasil ] && ( . /etc/uci-defaults/yggdrasil )
procd_open_instance
procd_set_param respawn
procd_set_param command /usr/sbin/yggdrasil -useconffile /etc/yggdrasil.conf
procd_set_param stdout 1
procd_set_param stderr 1
procd_close_instance
}
stop_service()
{
killall yggdrasil
}
reload_service()
{
restart
}
service_triggers()
{
procd_add_reload_trigger yggdrasil
}