summaryrefslogtreecommitdiff
path: root/sentinel-minipot/files/init
diff options
context:
space:
mode:
authorKarel Kočí <cynerd@email.cz>2020-07-11 16:06:59 +0200
committerKarel Kočí <cynerd@email.cz>2020-07-11 16:06:59 +0200
commit09fb4b7b9651a35e13a95d2da6e21d230bfebb34 (patch)
treed2379de111f3d835ce356b5e9f5f7fa4cca0eddb /sentinel-minipot/files/init
parent2f31048b9123444aed7559b72c56645d73379e4b (diff)
downloadopenwrt-personal-pkgs-09fb4b7b9651a35e13a95d2da6e21d230bfebb34.tar.gz
openwrt-personal-pkgs-09fb4b7b9651a35e13a95d2da6e21d230bfebb34.tar.bz2
openwrt-personal-pkgs-09fb4b7b9651a35e13a95d2da6e21d230bfebb34.zip
sentinel-minipot: include additional minipots
Diffstat (limited to 'sentinel-minipot/files/init')
-rwxr-xr-xsentinel-minipot/files/init12
1 files changed, 9 insertions, 3 deletions
diff --git a/sentinel-minipot/files/init b/sentinel-minipot/files/init
index 0b504c1..90ad252 100755
--- a/sentinel-minipot/files/init
+++ b/sentinel-minipot/files/init
@@ -4,19 +4,25 @@ USE_PROCD=1
START=99
STOP=10
-DEFAULT_TELNET_PORT=2333
start_service() {
source /lib/functions/sentinel.sh
+ source /usr/libexec/sentinel/minipot-defaults.sh
allowed_to_run "minipot" || return 1
config_load sentinel
- local telnet_port
+ local ftp_port http_port smtp_port telnet_port
+ config_get ftp_port minipot ftp_port "$DEFAULT_FTP_PORT"
+ config_get http_port minipot http_port "$DEFAULT_HTTP_PORT"
+ config_get smtp_port minipot smtp_port "$DEFAULT_SMTP_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"
+ [ "$ftp_port" = "0" ] || procd_append_param command --ftp="$ftp_port"
+ [ "$http_port" = "0" ] || procd_append_param command --http="$http_port"
+ [ "$smtp_port" = "0" ] || procd_append_param command --smtp="$smtp_port"
+ [ "$telnet_port" = "0" ] || procd_append_param command --telnet="$telnet_port"
procd_set_param respawn 3600 5 5
procd_set_param file /etc/config/sentinel
procd_close_instance