56 lines
1.8 KiB
Bash
Executable File
56 lines
1.8 KiB
Bash
Executable File
#!/bin/bash
|
|
#
|
|
# .---. . .
|
|
# | | |
|
|
# |--- .--. .-. .-. .-.| .-. .--.--. |.-. .-. .--. .-.
|
|
# | | (.-' (.-' ( | ( )| | | | )( )| | (.-'
|
|
# ' ' --' --' -' - -' ' ' -' -' -' ' - --'
|
|
#
|
|
# Freedom in the Cloud
|
|
#
|
|
# Resets the identity of a mesh user
|
|
#
|
|
# License
|
|
# =======
|
|
#
|
|
# This program is free software: you can redistribute it and/or modify
|
|
# it under the terms of the GNU Affero General Public License as published by
|
|
# the Free Software Foundation, either version 3 of the License, or
|
|
# (at your option) any later version.
|
|
#
|
|
# This program is distributed in the hope that it will be useful,
|
|
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
|
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
|
# GNU Affero General Public License for more details.
|
|
#
|
|
# You should have received a copy of the GNU Affero General Public License
|
|
# along with this program. If not, see <http://www.gnu.org/licenses/>.
|
|
|
|
PROJECT_NAME='freedombone'
|
|
|
|
export TEXTDOMAIN=${PROJECT_NAME}-mesh-reset
|
|
export TEXTDOMAINDIR="/usr/share/locale"
|
|
|
|
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 ${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
|
|
|
|
exit 0
|