From 931c8711d64b50c240c5cf1079480094dbde9ff1 Mon Sep 17 00:00:00 2001 From: David Runge Date: Tue, 31 Dec 2013 14:19:23 +0100 Subject: Adding new scripts from /usr/local/bin and updating backup-profiles and autostart --- bin/backup-settings | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) create mode 100755 bin/backup-settings (limited to 'bin/backup-settings') diff --git a/bin/backup-settings b/bin/backup-settings new file mode 100755 index 0000000..955a59e --- /dev/null +++ b/bin/backup-settings @@ -0,0 +1,19 @@ +#! /bin/sh + +etcTMP=/tmp/etc.tgz +etcIF=/etc +OF=/home/dave/Dropbox/sync +gpgEND=.gpg + +echo "Backing up /etc directory." +tar cfPz $etcTMP $etcIF +echo "Encrypting compressed directory." +su - dave -c "gpg -e -r 'David Runge ' $etcTMP" +echo "Changing permissions on file." +chown dave:dave $etcTMP$gpgEND +echo "Moving backup to Dropbox." +mv -f $etcTMP$gpgEND $OF +echo "Cleaning up." +rm $etcTMP +echo "Done." + -- cgit v1.2.3-70-g09d2