mirror of
https://gitlab.alpinelinux.org/alpine/aports.git
synced 2025-07-23 19:25:25 +03:00
- remove the sed stuff - pass configure opts instead of sed config.h - don't leak aports' git ref into miniupnpd binary - add missing test scripts - refactor init.d script - generate uuid from post-install - improve error message when external/internal interface is missing
30 lines
551 B
Text
30 lines
551 B
Text
#!/sbin/openrc-run
|
|
|
|
command="/usr/sbin/miniupnpd"
|
|
: ${command_args:="${ARGS:--f /etc/miniupnpd/miniupnpd.conf}"}
|
|
: ${pidfile:=/var/run/miniupnpd.pid}
|
|
|
|
depend() {
|
|
need net
|
|
use iptables ip6tables minissdpd
|
|
}
|
|
|
|
run_scripts() {
|
|
local ret=0 suffix="$1"
|
|
|
|
if [ -x /etc/miniupnpd/iptables_"$suffix" ]; then
|
|
/etc/miniupnpd/iptables_"$suffix" || ret=$?
|
|
fi
|
|
if [ -x /etc/miniupnpd/ip6tables_"$suffix" ]; then
|
|
/etc/miniupnpd/ip6tables_"$suffix" || ret=$?
|
|
fi
|
|
return $ret
|
|
}
|
|
|
|
start_pre() {
|
|
run_scripts init.sh
|
|
}
|
|
|
|
stop_post() {
|
|
run_scripts removeall.sh
|
|
}
|