diff options
author | Karel Kočí <cynerd@email.cz> | 2020-07-11 16:06:13 +0200 |
---|---|---|
committer | Karel Kočí <cynerd@email.cz> | 2020-07-11 16:06:13 +0200 |
commit | 2f31048b9123444aed7559b72c56645d73379e4b (patch) | |
tree | b7ec0953b884ea2be3815adc8e488327d8871dd0 /sentinel-minipot/files/init | |
parent | c1fac266afb99c28ffbb8213d8cf1f6c19a5b13b (diff) | |
download | openwrt-personal-pkgs-2f31048b9123444aed7559b72c56645d73379e4b.tar.gz openwrt-personal-pkgs-2f31048b9123444aed7559b72c56645d73379e4b.tar.bz2 openwrt-personal-pkgs-2f31048b9123444aed7559b72c56645d73379e4b.zip |
sentinel-minipot: include latest turris-os-version
Diffstat (limited to 'sentinel-minipot/files/init')
-rwxr-xr-x | sentinel-minipot/files/init | 23 |
1 files changed, 23 insertions, 0 deletions
diff --git a/sentinel-minipot/files/init b/sentinel-minipot/files/init new file mode 100755 index 0000000..0b504c1 --- /dev/null +++ b/sentinel-minipot/files/init @@ -0,0 +1,23 @@ +#!/bin/sh /etc/rc.common + +USE_PROCD=1 +START=99 +STOP=10 + +DEFAULT_TELNET_PORT=2333 + +start_service() { + source /lib/functions/sentinel.sh + allowed_to_run "minipot" || return 1 + + config_load sentinel + local telnet_port + config_get telnet_port minipot telnet_port "$DEFAULT_TELNET_PORT" + + procd_open_instance + procd_set_param command /usr/bin/sentinel-minipot + [ "$telnet_port" = "0" ] || procd_append_param command -T "$telnet_port" + procd_set_param respawn 3600 5 5 + procd_set_param file /etc/config/sentinel + procd_close_instance +} |