added password confirmation

This commit is contained in:
Dan 2022-01-23 20:45:26 +13:00
parent 8dfcd980a6
commit f0925ebabc
Signed by: dan
GPG Key ID: 57ABEF39C546B028
2 changed files with 16 additions and 2 deletions

View File

@ -2,7 +2,14 @@
# Variables
read -p "Enter your archive server ip address: " server
read -p "Enter your user for rsync daemon credentials: " user
read -p "Enter your password: " -s password
while true; do
read -s -p "Enter your password: " password
echo
read -s -p "Password (again): " password2
echo
[ "$password" = "$password2" ] && break
echo "Please try again"
done
# Hooks
mkdir /etc/pacman.d/hooks/

View File

@ -4,7 +4,14 @@ arch=$(uname -m)
server="$(ip addr show | grep "inet " | grep -v 127.0.0. | head -1 | cut -d" " -f6 | cut -d/ -f1)"
## Rsync credentials
read -p "Enter your user for rsync daemon credentials: " user
read -p "Enter your password: " -s password
while true; do
read -s -p "Enter your password: " password
echo
read -s -p "Password (again): " password2
echo
[ "$password" = "$password2" ] && break
echo "Please try again"
done
# Hooks
mkdir /etc/pacman.d/hooks/