dotfiles

Obligatory dotfiles repo
git clone git://git.danielmoch.com/dotfiles.git
Log | Files | Refs

commit 111aec0bc5d92639ee34b615dcbd38b50cf78f2b
parent 2c660cbcceb8e6c02d9b6f43101efe5fdccc5e17
Author: Daniel Moch <daniel@danielmoch.com>
Date:   Sun, 11 Feb 2018 18:15:14 -0500

Deal with new dotcom server

Diffstat:
M.local/lib/cron/photosync.sh | 11+++++++----
M.local/lib/dotfiles/pre-push | 2+-
M.ssh/config | 9+++++----
3 files changed, 13 insertions(+), 9 deletions(-)

diff --git a/.local/lib/cron/photosync.sh b/.local/lib/cron/photosync.sh @@ -19,19 +19,22 @@ else fi # Mount the WebDAV folder and set so only we can read it -if mount /mnt/nextcloud > /dev/null 2>&1 +if mount /mnt/nextcloud then echo "NextCloud WebDAV successfully mounted. Setting permissions." chmod 700 /mnt/nextcloud - # Rsync from WebDAV to ~/Photos (unidirectionally for now, in order to - # preserve server space) + # Rsync from WebDAV to ~/Photos echo "Syncing Photos from WebDAV to $LOCAL_FOLDER" rsync -aq /mnt/nextcloud/Photos/* $LOCAL_FOLDER + # Rsync from ~/Photos to WebDAV + echo "Syncing Photos from $LOCAL_FOLDER to WebDAV" + rsync -aq $LOCAL_FOLDER/* /mnt/nextcloud/Photos + # Finish by unmounting the WebDAV folder echo "Unmounting nextcloud.danielmoch.com" - umount /mnt/nextcloud > /dev/null 2>&1 + umount /mnt/nextcloud else echo "NextCloud WebDAV mount FAILED. Exiting." exit -2 diff --git a/.local/lib/dotfiles/pre-push b/.local/lib/dotfiles/pre-push @@ -2,6 +2,6 @@ cd .dotfiles tar czvf dotfiles.tar.gz `git ls master ..` scp dotfiles.tar.gz dotcom:~ -ssh dotcom sudo update_dotfiles +ssh dotcom update_dotfiles rm dotfiles.tar.gz exit 0 diff --git a/.ssh/config b/.ssh/config @@ -1,11 +1,12 @@ Host dotcom - HostName danielmoch.com + RemoteForward /run/user/1000/gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra -Host dotcom-public - HostName 104.236.52.17 +Host dotcom-git + User git + ForwardAgent no Host dotcom* - RemoteForward /home/djmoch/.gnupg/S.gpg-agent /run/user/1000/gnupg/S.gpg-agent.extra + HostName danielmoch.com Host pi raspberrypi HostName raspberrypi.localdomain