diff options
author | dinoex <dinoex@FreeBSD.org> | 2005-05-02 10:40:20 +0000 |
---|---|---|
committer | dinoex <dinoex@FreeBSD.org> | 2005-05-02 10:40:20 +0000 |
commit | 3420ed1b06138da74ddc562e8188a222a4abe79e (patch) | |
tree | f60b7ae5f6975e019c0e756b1b7195b141d9e4cd /ftp/vsftpd/files | |
parent | 00d844efd12a2843c53abeb2e1201ce313ce973c (diff) | |
download | FreeBSD-ports-3420ed1b06138da74ddc562e8188a222a4abe79e.zip FreeBSD-ports-3420ed1b06138da74ddc562e8188a222a4abe79e.tar.gz |
- Add rcNG script option
PR: 79687
Submitted by: Marcus Grando
Diffstat (limited to 'ftp/vsftpd/files')
-rw-r--r-- | ftp/vsftpd/files/vsftpd.sh | 42 |
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 0000000..6f86dea --- /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" |