|
|
@ -26,6 +26,7 @@ end
|
|
|
|
mkdir $LUKS_MOUNT
|
|
|
|
mkdir $LUKS_MOUNT
|
|
|
|
sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME
|
|
|
|
sudo cryptsetup open --type luks $LUKS_DEVICE $LUKS_NAME
|
|
|
|
sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT
|
|
|
|
sudo mount /dev/mapper/$LUKS_NAME $LUKS_MOUNT
|
|
|
|
|
|
|
|
echo "$LUKS_NAME" > .luks-device
|
|
|
|
"
|
|
|
|
"
|
|
|
|
|
|
|
|
|
|
|
|
if test "$argv" = '--browse'
|
|
|
|
if test "$argv" = '--browse'
|
|
|
@ -40,7 +41,7 @@ else
|
|
|
|
echo "Syncing filesystem..."
|
|
|
|
echo "Syncing filesystem..."
|
|
|
|
set_color normal
|
|
|
|
set_color normal
|
|
|
|
|
|
|
|
|
|
|
|
rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozE ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options
|
|
|
|
rsync --exclude-from=$RSYNC_IGNORE_FILE -rlptgozEv --delete ~ $USER@$REMOTE:$REMOTE_PATH #TODO find more applicable options
|
|
|
|
|
|
|
|
|
|
|
|
end
|
|
|
|
end
|
|
|
|
|
|
|
|
|
|
|
@ -48,8 +49,10 @@ end
|
|
|
|
set_color -o green
|
|
|
|
set_color -o green
|
|
|
|
echo "Syncing complete - unmounting luks container..."
|
|
|
|
echo "Syncing complete - unmounting luks container..."
|
|
|
|
set_color normal
|
|
|
|
set_color normal
|
|
|
|
|
|
|
|
read -P "Continue? Just press enter to start unmounting! "
|
|
|
|
ssh -t -i $KEY $USER@$REMOTE "
|
|
|
|
ssh -t -i $KEY $USER@$REMOTE "
|
|
|
|
sudo umount $LUKS_MOUNT
|
|
|
|
sudo umount $LUKS_MOUNT
|
|
|
|
sudo cryptsetup close --type luks $LUKS_NAME
|
|
|
|
sudo cryptsetup close --type luks (cat .luks-device)
|
|
|
|
rmdir $LUKS_MOUNT
|
|
|
|
rmdir $LUKS_MOUNT
|
|
|
|
|
|
|
|
rm .luks-device
|
|
|
|
"
|
|
|
|
"
|