Files
kai 07e384e17f Logrotate Integriert
um keinen eigenen Cronjob anlegen zu müssen, wurde hier die Installation von Logrotate integriert
2026-05-14 14:34:18 +00:00

29 lines
611 B
Bash
Executable File

#!/bin/bash
PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin
set -euo pipefail
REPO_DIR="/opt/pingu/repo"
TARGET_DIR="/opt/pingu/repo/scripts"
LOG_FILE="/opt/pingu/logs/deploy.log"
exec >> "$LOG_FILE" 2>&1
echo "==== $(date) Deploy gestartet auf $(hostname) ===="
cd "$REPO_DIR"
echo "Pull latest changes..."
git pull
echo "Sync scripts..."
rsync -av --delete "$REPO_DIR/scripts/" "$TARGET_DIR/"
echo "Set permissions..."
chmod +x "$TARGET_DIR"/*.sh
#logrotate Integration
echo "Install logrotate config..."
bash "$REPO_DIR/scripts/install-logrotate.sh"
echo "==== Deploy fertig ===="