浏览代码

Handle luks encrypted USB drives

Bob Mottram 10 年前
父节点
当前提交
ebb8fbe49c
共有 2 个文件被更改,包括 5 次插入3 次删除
  1. 1
    1
      doc/EN/usage.org
  2. 4
    2
      src/freedombone

+ 1
- 1
doc/EN/usage.org 查看文件

297
 
297
 
298
 Open the owncloud app and enter your owncloud domain name (including the https prefix) and login details for the user you created.
298
 Open the owncloud app and enter your owncloud domain name (including the https prefix) and login details for the user you created.
299
 
299
 
300
-Open the calendar app and under *settings* add a CalDav account with the url:
300
+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:
301
 
301
 
302
 #+BEGIN_SRC bash
302
 #+BEGIN_SRC bash
303
 https://myownclouddomain/remote.php/caldav/principals/myowncloudusername
303
 https://myownclouddomain/remote.php/caldav/principals/myowncloudusername

+ 4
- 2
src/freedombone 查看文件

1552
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
1552
   if grep -Fxq "create_backup_script" $COMPLETION_FILE; then
1553
       return
1553
       return
1554
   fi
1554
   fi
1555
-  apt-get -y install rsyncrypto
1555
+  apt-get -y install rsyncrypto cryptsetup
1556
 
1556
 
1557
   get_mariadb_password
1557
   get_mariadb_password
1558
   get_mariadb_gnusocial_admin_password
1558
   get_mariadb_gnusocial_admin_password
1574
   echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
1574
   echo '' >> /usr/bin/$BACKUP_SCRIPT_NAME
1575
   echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1575
   echo "umount -f $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1576
   echo "mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1576
   echo "mkdir $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1577
+  echo "cryptsetup luksOpen $USB_DRIVE $USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1577
   echo -n 'mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
1578
   echo -n 'mount $USB_DRIVE ' >> /usr/bin/$BACKUP_SCRIPT_NAME
1578
   echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1579
   echo "$USB_MOUNT" >> /usr/bin/$BACKUP_SCRIPT_NAME
1579
   echo 'if [ ! "$?" = "0" ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
1580
   echo 'if [ ! "$?" = "0" ]; then' >> /usr/bin/$BACKUP_SCRIPT_NAME
2159
   if grep -Fxq "create_restore_script" $COMPLETION_FILE; then
2160
   if grep -Fxq "create_restore_script" $COMPLETION_FILE; then
2160
       return
2161
       return
2161
   fi
2162
   fi
2162
-  apt-get -y install rsyncrypto
2163
+  apt-get -y install rsyncrypto cryptsetup
2163
 
2164
 
2164
   get_mariadb_password
2165
   get_mariadb_password
2165
   get_mariadb_gnusocial_admin_password
2166
   get_mariadb_gnusocial_admin_password
2181
   echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
2182
   echo '' >> /usr/bin/$RESTORE_SCRIPT_NAME
2182
   echo "if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
2183
   echo "if [ ! -d $USB_MOUNT ]; then" >> /usr/bin/$RESTORE_SCRIPT_NAME
2183
   echo "  mkdir $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
2184
   echo "  mkdir $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
2185
+  echo "  cryptsetup luksOpen $USB_DRIVE $USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
2184
   echo -n '  mount $USB_DRIVE ' >> /usr/bin/$RESTORE_SCRIPT_NAME
2186
   echo -n '  mount $USB_DRIVE ' >> /usr/bin/$RESTORE_SCRIPT_NAME
2185
   echo "$USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
2187
   echo "$USB_MOUNT" >> /usr/bin/$RESTORE_SCRIPT_NAME
2186
   echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME
2188
   echo 'fi' >> /usr/bin/$RESTORE_SCRIPT_NAME