updated reseter source script

This commit is contained in:
naturallaw77 2023-06-07 11:54:59 -07:00
parent a36e8bc8c9
commit d6d481bae9

View File

@ -67,18 +67,19 @@ fi
PASSWDNEW=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password") PASSWDNEW=$(
zenity --password --title="Please Type In A New Sovran Pro Updater Password")
ssh-keygen -q -N "$PASSWDNEW" -t ed25519 -f /home/free/.ssh/sovranpro_login ssh-keygen -q -N "$PASSWDNEW" -t ed25519 -f /home/free/.ssh/sovranpro_login
if [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]]; then
exit 1 exit 1
fi
if [[ $? != 0 ]]; then elif [[ $? != 0 ]]; then
zenity --error \ zenity --error \
--ellipsize \ --ellipsize \
--no-wrap \ --no-wrap \
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
@ -86,21 +87,20 @@ zenity --error \
exit 1 exit 1
fi else
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys'
ssh -i /home/free/.ssh/sovranpro_login root@${ID} 'sed -i -e "0,/ssh-ed25519.*/{ s::$(cat /home/free/.ssh/sovranpro_login.pub): }" /root/.ssh/authorized_keys' if [[ $? != 0 ]]; then
if [[ $? != 0 ]]; then zenity --error \
zenity --error \
--ellipsize \ --ellipsize \
--no-wrap \ --no-wrap \
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
--text="Could Not Move New Sovran Pro Login Keys To Root" --text="Could Not Move New Sovran Pro Login Keys To Root"
exit 1 exit 1
fi fi
fi fi