Password length for remote backups
This commit is contained in:
parent
c840f94034
commit
344c87b2f2
|
@ -116,6 +116,9 @@ DDNS_PASSWORD=
|
||||||
CURRENT_DDNS_DOMAIN=
|
CURRENT_DDNS_DOMAIN=
|
||||||
CURRENT_DDNS_CODE=
|
CURRENT_DDNS_CODE=
|
||||||
|
|
||||||
|
# Minimum number of characters in a password
|
||||||
|
MINIMUM_PASSWORD_LENGTH=10
|
||||||
|
|
||||||
# number of CPU cores
|
# number of CPU cores
|
||||||
CPU_CORES=1
|
CPU_CORES=1
|
||||||
|
|
||||||
|
@ -414,11 +417,16 @@ function interactive_configuration_remote_backups {
|
||||||
$remote_ssh_domain != "" && \
|
$remote_ssh_domain != "" && \
|
||||||
$remote_ssh_port != "" && \
|
$remote_ssh_port != "" && \
|
||||||
$remote_ssh_password != "" ]]; then
|
$remote_ssh_password != "" ]]; then
|
||||||
echo "$remote_ssh_username@$remote_ssh_domain:$remote_ssh_port//home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
|
|
||||||
|
if [ ${#remote_ssh_password} -lt $MINIMUM_PASSWORD_LENGTH ]; then
|
||||||
|
dialog --title "Password quality check" --msgbox "The password given was too short. It must be at least $MINIMUM_PASSWORD_LENGTH characters" 6 40
|
||||||
|
else
|
||||||
|
echo "$remote_ssh_username@$remote_ssh_domain:$remote_ssh_port//home/$remote_ssh_username $remote_ssh_password" >> $FRIENDS_SERVERS_LIST
|
||||||
|
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
|
||||||
|
fi
|
||||||
else
|
else
|
||||||
entering_remote_backups_done="yes"
|
entering_remote_backups_done="yes"
|
||||||
fi
|
fi
|
||||||
entering_remote_backups_ctr=$((entering_remote_backups_ctr + 1))
|
|
||||||
done
|
done
|
||||||
if [ -f $FRIENDS_SERVERS_LIST ]; then
|
if [ -f $FRIENDS_SERVERS_LIST ]; then
|
||||||
chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST
|
chown $MY_USERNAME:$MY_USERNAME $FRIENDS_SERVERS_LIST
|
||||||
|
|
Loading…
Reference in New Issue