summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorMichał Górny <mgorny@gentoo.org>2019-06-30 09:07:03 +0200
committerMichał Górny <mgorny@gentoo.org>2019-06-30 09:39:14 +0200
commit558047cd7e9293f68003d0af7f411fc77d1ceed0 (patch)
tree99ed0dddc058c302c55a22b999e11f48de1e814a /net-misc/miniupnpd/files/miniupnpd-init.d-r2
parentprofiles/package.mask: remove obsolete ruby packages mask (diff)
downloadgentoo-558047cd7e9293f68003d0af7f411fc77d1ceed0.tar.gz
gentoo-558047cd7e9293f68003d0af7f411fc77d1ceed0.tar.bz2
gentoo-558047cd7e9293f68003d0af7f411fc77d1ceed0.zip
net-misc/miniupnpd: Fix bashisms in init.d file
Closes: https://bugs.gentoo.org/646548 Signed-off-by: Michał Górny <mgorny@gentoo.org>
Diffstat (limited to 'net-misc/miniupnpd/files/miniupnpd-init.d-r2')
-rw-r--r--net-misc/miniupnpd/files/miniupnpd-init.d-r233
1 files changed, 33 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..744f59e6a44e
--- /dev/null
+++ b/net-misc/miniupnpd/files/miniupnpd-init.d-r2
@@ -0,0 +1,33 @@
+#!/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 iptables
+ use minissdpd
+}
+
+start_pre() {
+ local retval=0
+
+ if [ -z "${no_iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_init.sh || retval=${?}
+ fi
+
+ return ${retval}
+}
+
+stop_post() {
+ local retval=0
+
+ if [ -z "${no_iptables_scripts}" ]; then
+ /etc/miniupnpd/iptables_removeall.sh
+ fi
+
+ return ${retval}
+}