2024-10-02 05:29:17 +02:00
|
|
|
#!/usr/bin/env bash
|
|
|
|
|
2024-10-02 20:34:36 +02:00
|
|
|
# If the -q (quiet) flag is supplied, send all output to /dev/null.
|
|
|
|
if [[ "$1" == "-q" ]]; then
|
|
|
|
exec >/dev/null 2>&1
|
|
|
|
fi
|
|
|
|
|
|
|
|
if ! kbackup --verbose --autobg /home/jas/documents/default.kbp; then
|
|
|
|
logger -t sync_to_protondrive -s "Error running kbackup"
|
2024-10-02 05:29:17 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-10-02 20:34:36 +02:00
|
|
|
if ! rclone sync --transfers 8 -P /home/jas/sync_to_protondrive/ protondrive: ; then
|
|
|
|
logger -t sync_to_protondrive -s "Error running rclone"
|
2024-10-02 05:29:17 +02:00
|
|
|
exit 1
|
|
|
|
fi
|
|
|
|
|
2024-10-02 20:34:36 +02:00
|
|
|
logger -t sync_to_protondrive "sync_to_protondrive ran successfully"
|
|
|
|
|
2024-10-02 05:29:17 +02:00
|
|
|
exit 0
|