From 9d1a47a1dcf68b0ace6670481c1cfb9e5220bbcf Mon Sep 17 00:00:00 2001 From: Bob Mottram Date: Thu, 2 Oct 2014 21:20:19 +0100 Subject: [PATCH] Readme for restoring backups from friends --- install-freedombone.sh | 17 +++++++++++++++++ 1 file changed, 17 insertions(+) diff --git a/install-freedombone.sh b/install-freedombone.sh index 2b22ab93..9d38f388 100755 --- a/install-freedombone.sh +++ b/install-freedombone.sh @@ -710,6 +710,23 @@ function restore_from_friend { return fi + if ! grep -q "Restoring from Backups" /home/$MY_USERNAME/README; then + if [ ! -f /home/$MY_USERNAME/README ]; then + touch /home/$MY_USERNAME/README + fi + echo '' >> /home/$MY_USERNAME/README + echo '' >> /home/$MY_USERNAME/README + echo 'Restoring from Backups' >> /home/$MY_USERNAME/README + echo '======================' >> /home/$MY_USERNAME/README + echo 'To restore from USB backup plug in the USB drive then log in' >> /home/$MY_USERNAME/README + echo 'as root and just type "restore".' >> /home/$MY_USERNAME/README + echo '' >> /home/$MY_USERNAME/README + echo "To restore from a friend's server use the command:" >> /home/$MY_USERNAME/README + echo '' >> /home/$MY_USERNAME/README + echo " $RESTORE_FROM_FRIEND_SCRIPT_NAME [server]" >> /home/$MY_USERNAME/README + chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README + fi + if [ ! $BACKUP_TO_FRIENDS_PASSPHRASE ]; then BACKUP_TO_FRIENDS_PASSPHRASE=$(openssl rand -base64 32) fi