summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorConrad Kostecki <conikost@gentoo.org>2022-04-16 22:53:11 +0200
committerConrad Kostecki <conikost@gentoo.org>2022-04-16 22:53:11 +0200
commit224a3cd276de4fbce8b217bd11f122db28d7136f (patch)
treee707585ea7f9e8f8213eed0c0b731abf5986a9f9 /net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1
parentwww-client/chromium: security cleanup (diff)
downloadgentoo-224a3cd276de4fbce8b217bd11f122db28d7136f.tar.gz
gentoo-224a3cd276de4fbce8b217bd11f122db28d7136f.tar.bz2
gentoo-224a3cd276de4fbce8b217bd11f122db28d7136f.zip
net-ftp/pure-ftpd: fix non-posix script
Closes: https://bugs.gentoo.org/838844 Signed-off-by: Conrad Kostecki <conikost@gentoo.org>
Diffstat (limited to 'net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1')
-rw-r--r--net-ftp/pure-ftpd/files/pure-uploadscript.initd-r130
1 files changed, 30 insertions, 0 deletions
diff --git a/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1 b/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1
new file mode 100644
index 000000000000..5914c875fdf1
--- /dev/null
+++ b/net-ftp/pure-ftpd/files/pure-uploadscript.initd-r1
@@ -0,0 +1,30 @@
+#!/sbin/openrc-run
+# Copyright 1999-2022 Gentoo Authors
+# Distributed under the terms of the GNU General Public License v2
+
+ftpd_configfile="/etc/pure-ftpd.conf"
+pidfile="/run/pure-uploadscript.pid"
+
+command="/usr/sbin/pure-uploadscript"
+command_args="${UPLOADSCRIPT}"
+command_background="true"
+
+depend() {
+ need localmount
+ use netmount
+}
+
+start_pre() {
+ if [ -n "${UPLOADSCRIPT}" ] ; then
+ eerror "The file ${ftpd_configfile} does not exist!"
+ eerror "Please create and configure the uploadscript file."
+ return 1
+ fi
+
+ if ! grep "^CallUploadScript" "${ftpd_configfile}" ; then
+ eerror "You cannot start this uploadscript,"
+ eerror "unless you enable the option CallUploadScript"
+ eerror "in your main Pure-FTPd configuration file ${ftpd_configfile}"
+ return 1
+ fi
+}