We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 8cfbf71 commit b072479Copy full SHA for b072479
bin/v-change-sys-ip-nat
@@ -43,9 +43,19 @@ else
43
update_ip_value '$NAT' "$nat_ip"
44
fi
45
46
-# Change vsftpd config
+# Check ftp system
47
if [ "$FTP_SYSTEM" = 'vsftpd' ]; then
48
- conf="/etc/vsftpd/vsftpd.conf"
+
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
57
58
+ # Update config
59
if [ -z "$(grep pasv_address $conf)" ]; then
60
if [ ! -z "$nat_ip" ]; then
61
echo "pasv_address=$nat_ip" >> $conf
0 commit comments