freedombone/src/freedombone-mesh-reset

56 lines
1.8 KiB
Plaintext
Raw Normal View History

2016-07-21 23:43:40 +02:00
#!/bin/bash
2018-04-08 14:30:21 +02:00
# _____ _ _
# | __|___ ___ ___ _| |___ _____| |_ ___ ___ ___
# | __| _| -_| -_| . | . | | . | . | | -_|
# |__| |_| |___|___|___|___|_|_|_|___|___|_|_|___|
2016-07-21 23:43:40 +02:00
#
2018-04-08 14:30:21 +02:00
# Freedom in the Cloud
2016-07-21 23:43:40 +02:00
#
# 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"
MESH_INSTALL_COMPLETED=/root/.mesh_setup_completed
2017-12-06 23:20:05 +01:00
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 --width=300; then
2018-01-13 18:35:09 +01:00
sudo batman stop
2018-01-13 18:35:09 +01:00
2017-10-28 21:43:26 +02:00
sudo pkill qtox
sudo pkill firefox
sudo pkill iceweasel
sudo pkill midori
sudo pkill patchwork
sudo rm -f $MESH_INSTALL_COMPLETED
2018-03-02 20:17:02 +01:00
sudo "${PROJECT_NAME}-image-mesh" "$USER" new
2018-01-13 18:35:09 +01:00
sudo batman start
2018-01-13 18:35:09 +01:00
2018-03-02 20:17:02 +01:00
if [ -f "$HOME/mesh-desktop.sh" ]; then
"$HOME/mesh-desktop.sh"
2017-10-28 21:43:26 +02:00
else
2017-10-28 21:54:37 +02:00
zenity --info --title=$"New Identity" --text=$"You now have a new identity" --width=200
2017-10-28 21:43:26 +02:00
fi
fi
2016-07-21 23:43:40 +02:00
exit 0