Passphrase in user readme

This commit is contained in:
Bob Mottram 2014-10-02 19:10:59 +01:00
parent e152ebcd0b
commit 0370616469
1 changed files with 6 additions and 0 deletions

View File

@ -562,6 +562,12 @@ function backup_to_friends_servers {
if [ ! $BACKUP_TO_FRIENDS_PASSPHRASE ]; then
BACKUP_TO_FRIENDS_PASSPHRASE=$(openssl rand -base64 32)
if [ ! -f /home/$MY_USERNAME/README ]; then
touch /home/$MY_USERNAME/README
fi
echo '' >> /home/$MY_USERNAME/README
echo "Passphrase for backups on friends servers: $BACKUP_TO_FRIENDS_PASSPHRASE" >> /home/$MY_USERNAME/README
chown $MY_USERNAME:$MY_USERNAME /home/$MY_USERNAME/README
fi
echo '#!/bin/bash' > /usr/bin/$BACKUP_TO_FRIENDS_SCRIPT_NAME