mirror of
https://github.com/serghey-rodin/vesta.git
synced 2025-08-19 21:04:06 -07:00
Fixes from Neilpang
This commit is contained in:
parent
79e4f5ed26
commit
e3f636cb3a
2 changed files with 7 additions and 1 deletions
|
@ -52,7 +52,7 @@ is_system_enabled "$FIREWALL_SYSTEM" 'FIREWALL_SYSTEM'
|
||||||
get_next_fw_rule
|
get_next_fw_rule
|
||||||
validate_format 'rule'
|
validate_format 'rule'
|
||||||
is_object_new '../../data/firewall/rules' 'RULE' "$rule"
|
is_object_new '../../data/firewall/rules' 'RULE' "$rule"
|
||||||
if [ ! -z "$comment"]; then
|
if [ ! -z "$comment" ]; then
|
||||||
validate_format 'comment'
|
validate_format 'comment'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -51,6 +51,12 @@ if [ $? -ne 0 ]; then
|
||||||
conntrack_ftp='no'
|
conntrack_ftp='no'
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Checking custom OpenSSH port
|
||||||
|
sshport=$(grep '^Port ' /etc/ssh/sshd_config | head -1 | cut -d ' ' -f 2)
|
||||||
|
if [[ "$sshport" =~ ^[0-9]+$ ]] && [ "$sshport" -ne "22" ]; then
|
||||||
|
sed -i "s/PORT='22'/PORT=\'$sshport\'/" $rules
|
||||||
|
fi
|
||||||
|
|
||||||
# Creating temporary file
|
# Creating temporary file
|
||||||
tmp=$(mktemp)
|
tmp=$(mktemp)
|
||||||
|
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue