updated master script
This commit is contained in:
parent
b9fae52ec5
commit
3e07d35312
@ -40,9 +40,9 @@ FILE=/var/lib/beacons/reseter/completed
|
||||
|
||||
#### 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 \
|
||||
--ellipsize \
|
||||
@ -50,23 +50,23 @@ FILE=/var/lib/beacons/reseter/completed
|
||||
--title="Sovran_SystemsOS_Reseter" \
|
||||
--text="Could Not Create Reseter Tag"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
#### 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 \
|
||||
--ellipsize \
|
||||
@ -74,13 +74,13 @@ FILE=/var/lib/beacons/reseter/completed
|
||||
--title="Sovran_SystemsOS_Reseter" \
|
||||
--text="Could Not Create New Login Key"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
exit 1
|
||||
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'
|
||||
|
||||
if [[ $? != 0 ]]; then
|
||||
if [[ $? != 0 ]]; then
|
||||
|
||||
zenity --error \
|
||||
--ellipsize \
|
||||
@ -88,9 +88,9 @@ FILE=/var/lib/beacons/reseter/completed
|
||||
--title="Sovran_SystemsOS_Reseter" \
|
||||
--text="Could Not Move Key to Root"
|
||||
|
||||
exit 1
|
||||
fi
|
||||
fi
|
||||
exit 1
|
||||
fi
|
||||
|
||||
fi
|
||||
|
||||
rm -rf /home/free/.ssh/factory_login /home/free/.ssh/factory_login.pub
|
||||
|
Reference in New Issue
Block a user