Compare commits
2 Commits
Author | SHA1 | Date | |
---|---|---|---|
63f6f969cc
|
|||
03fa82b223
|
@@ -1,8 +1,17 @@
|
|||||||
#!/bin/sh
|
#!/bin/sh
|
||||||
|
|
||||||
# Create crontab in a writable location
|
# Create crontab in a writable location and set proper permissions
|
||||||
mkdir -p /tmp/crontabs
|
mkdir -p /tmp/crontabs
|
||||||
echo "${CRONTAB} /scripts/backup.sh" > /tmp/crontabs/root
|
echo "${CRONTAB:-"0 * * * *"} /scripts/backup.sh" > /tmp/crontabs/root
|
||||||
|
chmod 644 /tmp/crontabs/root
|
||||||
|
|
||||||
|
# Run initial backup
|
||||||
/scripts/backup.sh
|
/scripts/backup.sh
|
||||||
exec crond -f -c /tmp/crontabs
|
|
||||||
|
# Start crond with debug output
|
||||||
|
echo "Starting crond with config:"
|
||||||
|
cat /tmp/crontabs/root
|
||||||
|
echo "---"
|
||||||
|
|
||||||
|
# Start crond in foreground with debug output
|
||||||
|
exec crond -f -c /tmp/crontabs -d 8
|
||||||
|
@@ -23,11 +23,11 @@ case $1 in
|
|||||||
rclone copy --progress $2 $3
|
rclone copy --progress $2 $3
|
||||||
;;
|
;;
|
||||||
list)
|
list)
|
||||||
echo "list $2"
|
echo "list ${MINIO_PATH}/$2"
|
||||||
rclone ls $2
|
rclone ls ${MINIO_PATH}/$2
|
||||||
;;
|
;;
|
||||||
delete)
|
delete)
|
||||||
echo "delete $2"
|
echo "delete ${MINIO_PATH}/$2"
|
||||||
rclone delete $2
|
rclone delete ${MINIO_PATH}/$2
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
Reference in New Issue
Block a user