Skip to content

Commit b072479

Browse files
committed
check vsftpd.conf in common locations
1 parent 8cfbf71 commit b072479

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

bin/v-change-sys-ip-nat

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -43,9 +43,19 @@ else
4343
update_ip_value '$NAT' "$nat_ip"
4444
fi
4545

46-
# Change vsftpd config
46+
# Check ftp system
4747
if [ "$FTP_SYSTEM" = 'vsftpd' ]; then
48-
conf="/etc/vsftpd/vsftpd.conf"
48+
49+
# Find configuration
50+
if [ -e '/etc/vsftpd/vsftpd.conf' ]; then
51+
conf='/etc/vsftpd/vsftpd.conf'
52+
fi
53+
54+
if [ -e '/etc/vsftpd.conf' ]; then
55+
conf='/etc/vsftpd.conf'
56+
fi
57+
58+
# Update config
4959
if [ -z "$(grep pasv_address $conf)" ]; then
5060
if [ ! -z "$nat_ip" ]; then
5161
echo "pasv_address=$nat_ip" >> $conf

0 commit comments

Comments
 (0)