Handle luks encrypted USB drives

This commit is contained in:
Bob Mottram 2015-06-07 12:05:52 +01:00
parent ec83f3c171
commit ebb8fbe49c
2 changed files with 5 additions and 3 deletions

View File

@ -297,7 +297,7 @@ Within F-droid search for *owncloud* and install the client. Also install *CalDA
Open the owncloud app and enter your owncloud domain name (including the https prefix) and login details for the user you created.
Open the calendar app and under *settings* add a CalDav account with the url:
Open the calendar app (S planner) and under *settings* select *Calendars* then *Add account* then *CalDAV Sync Adapter*. Enter your owncloud username and password and the following URL:
#+BEGIN_SRC bash
https://myownclouddomain/remote.php/caldav/principals/myowncloudusername

View File

@ -1552,7 +1552,7 @@ function create_backup_script {
if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
return
fi
apt-get -y install rsyncrypto
apt-get -y install rsyncrypto cryptsetup
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -1574,6 +1574,7 @@ function create_backup_script {
echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "cryptsetup luksOpen $USB_DRIVE $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo -n 'mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
echo 'if [ ! "$?" = "0" ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
@ -2159,7 +2160,7 @@ function create_restore_script {
if grep -Fxq "create_restore_script" $COMPLETION_FILE; then
return
fi
apt-get -y install rsyncrypto
apt-get -y install rsyncrypto cryptsetup
get_mariadb_password
get_mariadb_gnusocial_admin_password
@ -2181,6 +2182,7 @@ function create_restore_script {
echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo "if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo " mkdir $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo " cryptsetup luksOpen $USB_DRIVE $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo -n ' mount $USB_DRIVE ' >> /usr/bin/$RESTORE_SCRIPT_NAME
echo "$USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME