diff --git a/src/freedombone-mesh-reset b/src/freedombone-mesh-reset index 7d0855d9..ceedba70 100755 --- a/src/freedombone-mesh-reset +++ b/src/freedombone-mesh-reset @@ -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