aboutsummaryrefslogtreecommitdiff
path: root/ftp/vsftpd/files
diff options
context:
space:
mode:
authorDirk Meyer <dinoex@FreeBSD.org>2005-05-02 10:40:20 +0000
committerDirk Meyer <dinoex@FreeBSD.org>2005-05-02 10:40:20 +0000
commit1de4043bdf83fccdd544b42582229681909f76dc (patch)
tree97c0e6e220ccef45b80986a713d9adf88f0a5843 /ftp/vsftpd/files
parent4071f5899da5aca61590d61430a888d84e3285d7 (diff)
Notes
Diffstat (limited to 'ftp/vsftpd/files')
-rw-r--r--ftp/vsftpd/files/vsftpd.sh42
1 files changed, 42 insertions, 0 deletions
diff --git a/ftp/vsftpd/files/vsftpd.sh b/ftp/vsftpd/files/vsftpd.sh
new file mode 100644
index 000000000000..6f86deae4574
--- /dev/null
+++ b/ftp/vsftpd/files/vsftpd.sh
@@ -0,0 +1,42 @@
+#!/bin/sh
+#
+# $FreeBSD$
+#
+
+# PROVIDE: vsftpd
+# REQUIRE: DAEMON
+# KEYWORD: FreeBSD
+
+# Add the following line to /etc/rc.conf to enable `vsftpd':
+#
+# vsftpd_enable="YES"
+# vsftpd_flags="/some/path/conf.file" # Not required
+#
+
+. "%%RC_SUBR%%"
+
+name="vsftpd"
+rcvar=`set_rcvar`
+
+load_rc_config "$name"
+: ${vsftpd_enable="NO"}
+: ${vsftpd_flags=""}
+
+command="%%PREFIX%%/libexec/$name ${vsftpd_flags}"
+required_files="%%PREFIX%%/etc/$name.conf"
+
+vsftpd_check()
+{
+ cat ${required_files} | egrep -E "^listen.*=.*YES$" > /dev/null
+ if [ $? = 1 ]; then
+ err 1 "vsftpd script need "listen=YES" on config file"
+ fi
+ cat ${required_files} | egrep -E "^background.*=.*YES$" > /dev/null
+ if [ $? = 1 ]; then
+ err 1 "vsftpd script need "background=YES" on config file"
+ fi
+}
+
+vsftpd_check
+
+run_rc_command "$1"