updated master script

This commit is contained in:
naturallaw77 2023-06-17 18:52:29 -07:00
parent b9fae52ec5
commit 3e07d35312

View File

@ -40,9 +40,9 @@ FILE=/var/lib/beacons/reseter/completed
#### Initial Reseter Tag #### #### Initial Reseter Tag ####
ssh -i /home/free/.ssh/factory_login root@${ID} 'mkdir /var/lib/beacons/reseter ; touch /var/lib/beacons/reseter/started' ssh -i /home/free/.ssh/factory_login root@${ID} 'mkdir /var/lib/beacons/reseter ; touch /var/lib/beacons/reseter/started'
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
zenity --error \ zenity --error \
--ellipsize \ --ellipsize \
@ -50,23 +50,23 @@ FILE=/var/lib/beacons/reseter/completed
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
--text="Could Not Create Reseter Tag" --text="Could Not Create Reseter Tag"
exit 1 exit 1
fi fi
#### Create New Log In Key For the Local Sovran Pro #### #### Create New Log In Key For the Local Sovran Pro ####
PASS=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password") PASS=$(zenity --password --title="Please Type In A New Sovran Pro Updater Password")
if [[ $? -eq 1 ]]; then if [[ $? -eq 1 ]]; then
exit 1 exit 1
else else
ssh-keygen -q -N "${PASS}" -t ed25519 -f /home/free/.ssh/sovranpro_login ssh-keygen -q -N "${PASS}" -t ed25519 -f /home/free/.ssh/sovranpro_login
if [[ $? != 0 ]]; then if [[ $? != 0 ]]; then
zenity --error \ zenity --error \
--ellipsize \ --ellipsize \
@ -74,13 +74,13 @@ FILE=/var/lib/beacons/reseter/completed
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
--text="Could Not Create New Login Key" --text="Could Not Create New Login Key"
exit 1 exit 1
fi fi
ssh -i /home/free/.ssh/factory_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/factory_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 \
@ -88,9 +88,9 @@ FILE=/var/lib/beacons/reseter/completed
--title="Sovran_SystemsOS_Reseter" \ --title="Sovran_SystemsOS_Reseter" \
--text="Could Not Move Key to Root" --text="Could Not Move Key to Root"
exit 1 exit 1
fi fi
fi
fi fi
rm -rf /home/free/.ssh/factory_login /home/free/.ssh/factory_login.pub rm -rf /home/free/.ssh/factory_login /home/free/.ssh/factory_login.pub