local-bin/apsalar/nc-sync

19 lines
432 B
Bash
Executable file

#!/bin/sh
if [ -f /tmp/nc-sync.lock ]; then
notify-send "Lock found, exiting"
exit 1
else
touch /tmp/nc-sync.lock
# Needed for cronjob
source /home/siina/.config/private.env
NC_DIR="/home/siina/Nextcloud"
NC_URL="https://cloud.criminallycute.fi"
notify-send "Nextcloud Sync Syncing ..."
nextcloudcmd -u $NC_USER -p $NC_PASS $NC_DIR $NC_URL
notify-send "Nextcloud Sync Done syncing"
rm /tmp/nc-sync.lock
fi