2024-04-04 06:35:00 +03:00
|
|
|
#!/bin/sh
|
|
|
|
|
2024-04-22 06:47:34 +03:00
|
|
|
(
|
|
|
|
if flock -n 9
|
|
|
|
then
|
2024-04-22 06:49:46 +03:00
|
|
|
echo 'Lock present, exiting'
|
2024-04-22 06:47:34 +03:00
|
|
|
exit;
|
|
|
|
fi
|
|
|
|
|
|
|
|
# Needed for cronjob
|
|
|
|
source /home/siina/.config/private.env
|
|
|
|
|
|
|
|
NC_DIR="/home/siina/Nextcloud"
|
|
|
|
NC_URL="https://cloud.criminallycute.fi"
|
|
|
|
|
2024-04-22 06:49:46 +03:00
|
|
|
echo "Nextcloud Sync Syncing ..."
|
2024-04-22 06:47:34 +03:00
|
|
|
nextcloudcmd -u $NC_USER -p $NC_PASS $NC_DIR $NC_URL
|
2024-04-22 06:49:46 +03:00
|
|
|
echo "Nextcloud Sync Done syncing"
|
2024-04-22 06:47:34 +03:00
|
|
|
|
|
|
|
) 9>'/tmp/nc-sync.lock'
|
|
|
|
rm -f '/tmp/nc-sync.lock'
|
2024-04-04 06:35:00 +03:00
|
|
|
|