blob: a9ed8625b04319bcad887d77d50d8c2f4d6e86d2 (
plain) (
blame)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
|
#!/bin/sh
# PROVIDE: vsftpd6
# REQUIRE: DAEMON
# KEYWORD: shutdown
#
# To enable 'vsftpd' in standalone mode, you need to edit two files.
# 1. add the following line(s) to /etc/rc.conf to enable `vsftpd':
#
# vsftpd6_enable="YES"
# vsftpd6_flags="-ooption=value" # Not required
# vsftpd6_config="/some/path/conf.file" # Not required
#
. /etc/rc.subr
name="vsftpd6"
desc="Vsftpd FTP IPv6 Server"
rcvar="vsftpd6_enable"
load_rc_config "$name"
: ${vsftpd6_enable:="NO"}
: ${vsftpd6_config:="%%PREFIX%%/etc/$name.conf"}
: ${vsftpd6_flags:=-olisten_ipv6=YES -obackground=YES}
command="%%PREFIX%%/libexec/$name"
required_files="${vsftpd6_config}"
start_precmd="vsftpd6_check"
extra_commands="reload"
vsftpd6_flags="${vsftpd6_config} ${vsftpd6_flags}"
vsftpd6_check()
{
if grep -q "^ftp[ ]" /etc/inetd.conf
then
err 1 "ftp is already activated in /etc/inetd.conf"
fi
if ! egrep -q -i -E "^listen_ipv6.*=.*YES$" ${vsftpd6_config}
then
err 1 'vsftpd6 script need "listen=YES" in config file'
fi
if ! egrep -q -i -E "^background.*=.*YES$" ${vsftpd6_config}
then
err 1 'vsftpd6 script need "background=YES" in config file'
fi
}
run_rc_command "$1"
|