mirror of
https://github.com/vmstan/gravity-sync.git
synced 2024-08-30 18:22:11 +00:00
simpler prompt
This commit is contained in:
parent
5e023aa187
commit
584deacf61
@ -613,18 +613,17 @@ case $# in
|
|||||||
|
|
||||||
if hash sshpass 2>/dev/null
|
if hash sshpass 2>/dev/null
|
||||||
then
|
then
|
||||||
echo -e "${INFO} SSHPASS Utility Detected"
|
MESSAGE="SSHPASS Utility Detected"
|
||||||
|
echo -e "${INFO} ${MESSAGE}"
|
||||||
|
|
||||||
MESSAGE="Do you want to configure password based SSH authentication (not reccomended)?"
|
MESSAGE="Do you want to configure password based SSH authentication (not reccomended)?"
|
||||||
echo -e "${WARN} ${MESSAGE}"
|
echo -e "${WARN} ${MESSAGE}"
|
||||||
MESSAGE="Your password will be saved in clear-text in the ${CONFIG_FILE} file!"
|
MESSAGE="Your password will be saved in clear-text in the ${CONFIG_FILE} file!"
|
||||||
echo -e "${WARN} ${MESSAGE}"
|
echo -e "${WARN} ${MESSAGE}"
|
||||||
MESSAGE="Select NO to use (preferred) SSH Key-Pair Authentication."
|
MESSAGE="Leave blank to use (preferred) SSH Key-Pair Authentication."
|
||||||
echo -e "${WARN} ${MESSAGE}"
|
echo -e "${WARN} ${MESSAGE}"
|
||||||
|
MESSAGE="Enter SSH password for primary Pi-hole server (optional)"
|
||||||
|
|
||||||
select yn in "Yes" "No"; do
|
|
||||||
case $yn in
|
|
||||||
Yes )
|
|
||||||
MESSAGE="Enter SSH password for primary Pi-hole server"
|
|
||||||
echo -e "${NEED} ${MESSAGE}"
|
echo -e "${NEED} ${MESSAGE}"
|
||||||
read INPUT_REMOTE_PASS
|
read INPUT_REMOTE_PASS
|
||||||
|
|
||||||
@ -632,13 +631,6 @@ case $# in
|
|||||||
echo -en "${STAT} ${MESSAGE}"
|
echo -en "${STAT} ${MESSAGE}"
|
||||||
sed -i "/REMOTE_PASS=''/c\REMOTE_PASS='${INPUT_REMOTE_PASS}'" $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
|
sed -i "/REMOTE_PASS=''/c\REMOTE_PASS='${INPUT_REMOTE_PASS}'" $HOME/${LOCAL_FOLDR}/${CONFIG_FILE}
|
||||||
error_validate
|
error_validate
|
||||||
;;
|
|
||||||
|
|
||||||
No )
|
|
||||||
echo -e "${INFO} Defaulting to SSH Key-Pair Authentication"
|
|
||||||
;;
|
|
||||||
esac
|
|
||||||
done
|
|
||||||
|
|
||||||
else
|
else
|
||||||
MESSAGE="SSHPASS Not Installed"
|
MESSAGE="SSHPASS Not Installed"
|
||||||
|
Loading…
Reference in New Issue
Block a user