Skip to content
Snippets Groups Projects
Commit af9806f4 authored by Bob Mottram's avatar Bob Mottram
Browse files

Use zenity for mesh identity reset

parent 239614e8
No related branches found
No related tags found
No related merge requests found
......@@ -33,28 +33,22 @@ export TEXTDOMAINDIR="/usr/share/locale"
MESH_INSTALL_COMPLETED=/root/.mesh_setup_completed
dialog --title $"New Identity" \
--backtitle $"Freedombone Mesh" \
--defaultno \
--yesno $"\nDo you want to reset your identity? This will reset ALL data for this peer, and you will not be able to recover it." 8 60
sel=$?
case $sel in
0) sudo batman stop
sudo pkill qtox
sudo pkill firefox
sudo pkill iceweasel
sudo pkill midori
sudo pkill patchwork
sudo rm -f $MESH_INSTALL_COMPLETED
sudo ${PROJECT_NAME}-image-mesh $USER new
sudo batman start
if [ -f $HOME/mesh-desktop.sh ]; then
$HOME/mesh-desktop.sh
else
dialog --title $"New Identity" \
--msgbox $"You now have a new identity" 6 40
fi
;;
esac
if ! zenity --question --title='New Identity' --text="Do you want to reset your identity? This will reset ALL data for this peer, and you will not be able to recover it." --ok-label=No --cancel-label=Yes; then
sudo batman stop
sudo pkill qtox
sudo pkill firefox
sudo pkill iceweasel
sudo pkill midori
sudo pkill patchwork
sudo rm -f $MESH_INSTALL_COMPLETED
sudo ${PROJECT_NAME}-image-mesh $USER new
sudo batman start
if [ -f $HOME/mesh-desktop.sh ]; then
$HOME/mesh-desktop.sh
else
dialog --title $"New Identity" \
--msgbox $"You now have a new identity" 6 40
fi
fi
exit 0
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment