diff options
author | V3n3RiX <venerix@redcorelinux.org> | 2019-06-30 17:36:28 +0100 |
---|---|---|
committer | V3n3RiX <venerix@redcorelinux.org> | 2019-06-30 17:36:28 +0100 |
commit | 7014a5a3ea0feffab9701fdd6b64cc7667a985af (patch) | |
tree | f2cbbaa8bb9209cd15208721103228336149b799 /net-misc/miniupnpd/files/miniupnpd-init.d-r2 | |
parent | 7a86906b67693cc65671d3e1476835d3a7e13092 (diff) |
gentoo resync : 30.06.2019
Diffstat (limited to 'net-misc/miniupnpd/files/miniupnpd-init.d-r2')
-rw-r--r-- | net-misc/miniupnpd/files/miniupnpd-init.d-r2 | 45 |
1 files changed, 45 insertions, 0 deletions
diff --git a/net-misc/miniupnpd/files/miniupnpd-init.d-r2 b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 new file mode 100644 index 000000000000..e23c7a819951 --- /dev/null +++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2 @@ -0,0 +1,45 @@ +#!/sbin/openrc-run +# Copyright 1999-2019 Gentoo Authors +# Distributed under the terms of the GNU General Public License v2 + +command="/usr/sbin/miniupnpd" +: "${config_file:=/etc/miniupnpd/miniupnpd.conf}" +command_args="-f ${config_file:-/etc/miniupnpd/miniupnpd.conf} ${extra_args}" +: "${pidfile:=/var/run/miniupnpd.pid}" + +depend() { + need net + use iptables ip6tables minissdpd +} + +start_pre() { + local retval=0 + + if [ -n "${iptables_scripts}" ]; then + /etc/miniupnpd/iptables_init.sh || retval=${?} + fi + if [ -n "${ip6tables_scripts}" ]; then + /etc/miniupnpd/ip6tables_init.sh || retval=${?} + fi + if [ -n "${nftables_scripts}" ]; then + /etc/miniupnpd/nft_init.sh || retval=${?} + fi + + return ${retval} +} + +stop_post() { + local retval=0 + + if [ -n "${iptables_scripts}" ]; then + /etc/miniupnpd/iptables_removeall.sh + fi + if [ -n "${ip6tables_scripts}" ]; then + /etc/miniupnpd/ip6tables_removeall.sh + fi + if [ -n "${nftables_scripts}" ]; then + /etc/miniupnpd/nft_removeall.sh + fi + + return ${retval} +} |