blob: 90ad252582ff6ede97b33275d43b4490ca2777f3 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
|
#!/bin/sh /etc/rc.common
USE_PROCD=1
START=99
STOP=10
start_service() {
source /lib/functions/sentinel.sh
source /usr/libexec/sentinel/minipot-defaults.sh
allowed_to_run "minipot" || return 1
config_load sentinel
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
[ "$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
}
|