mirror of
https://github.com/acedanger/shell.git
synced 2026-03-24 19:11:48 -07:00
feat: Add log_status function to improve logging in backup script
This commit is contained in:
@@ -231,6 +231,11 @@ LOG_FILE="${LOG_DIR}/immich-backup.log"
|
|||||||
log_message() {
|
log_message() {
|
||||||
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
|
echo "$(date '+%Y-%m-%d %H:%M:%S') - $1" | tee -a "$LOG_FILE"
|
||||||
}
|
}
|
||||||
|
|
||||||
|
# Function to log status (wrapper for log_message)
|
||||||
|
log_status() {
|
||||||
|
log_message "$1"
|
||||||
|
}
|
||||||
# Create backup directory if it doesn't exist
|
# Create backup directory if it doesn't exist
|
||||||
BACKUP_DIR="$(dirname "$0")/../immich_backups"
|
BACKUP_DIR="$(dirname "$0")/../immich_backups"
|
||||||
mkdir -p "$BACKUP_DIR"
|
mkdir -p "$BACKUP_DIR"
|
||||||
|
|||||||
Reference in New Issue
Block a user