aboutsummaryrefslogtreecommitdiffstats
path: root/community/proftpd/proftpd.initd
diff options
context:
space:
mode:
Diffstat (limited to 'community/proftpd/proftpd.initd')
-rw-r--r--community/proftpd/proftpd.initd35
1 files changed, 35 insertions, 0 deletions
diff --git a/community/proftpd/proftpd.initd b/community/proftpd/proftpd.initd
new file mode 100644
index 0000000000..05670abc71
--- /dev/null
+++ b/community/proftpd/proftpd.initd
@@ -0,0 +1,35 @@
+#!/sbin/openrc-run
+
+name="ProFTPD"
+description="ProFTPD FTP Server"
+
+pidfile="/run/proftpd/proftpd.pid"
+command="/usr/sbin/proftpd"
+command_args="-n"
+command_background="yes"
+required_files="/etc/proftpd/proftpd.conf"
+extra_commands="checkconfig"
+extra_started_commands="reload"
+description_checkconfig="Check configuration"
+description_reload="Reload configuration"
+
+depend() {
+ need net
+ use logger dns
+ after firewall
+}
+
+checkconfig() {
+ $command -t
+}
+
+start_pre() {
+ checkpath --directory ${pidfile%/*}
+ checkconfig >/dev/null 2>&1
+}
+
+reload() {
+ ebegin "Reloading ${name:-$RC_SVCNAME}"
+ checkconfig >/dev/null 2>&1 && start-stop-daemon --signal HUP --pidfile $pidfile
+ eend $?
+}