Add log function to backup script:
This commit is contained in:
parent
c8409a00f4
commit
810fccfce2
@ -13,6 +13,12 @@ export TERRARIADIR="{{ terraria_root }}/{{ terraria_name }}"
|
||||
export OUTDIR="$TERRARIADIR/backups"
|
||||
retention=144 # 30-minute intervals, 3 days
|
||||
|
||||
# Helper functions
|
||||
log() {
|
||||
[ -z "$1" ] && return 1
|
||||
printf "$(date -Iseconds): $1\n"
|
||||
}
|
||||
|
||||
# Sanity checks
|
||||
if ! [ -d "$OUTDIR" ]; then
|
||||
if ! mkdir "$OUTDIR"; then
|
||||
|
Loading…
Reference in New Issue
Block a user