Add common module managing common services and scripts (act_runner, create/restore backups)

Fix script environment variables
Add Fefan configuration
Fix gateway services file provisionning through ssh
This commit is contained in:
2026-01-20 15:42:17 +01:00
parent 152f09ac50
commit 1de2fe9ab4
53 changed files with 285 additions and 442 deletions

View File

@@ -1,10 +1,10 @@
#!/bin/bash
set -euo pipefail
source /opt/gitea/env.sh
source /opt/environment/.env
TIMESTAMP=$(date +'%Y-%m-%d_%H%M%S')
sudo -u "$GITEA_USER" gitea dump -c "$GITEA_HOME/app.ini" -f $GITEA_BACKUPS_DIR/gitea-dump-$TIMESTAMP.zip
sudo -u "$GITEA_USER" gitea dump -c "$GITEA_CONF" -f $SERVICE_BACKUPS_DIR/$SERVICE_BACKUPS_PREFIX-$TIMESTAMP.$SERVICE_BACKUPS_EXTENSION
ls -1dt $GITEA_BACKUPS_DIR/gitea-dump-*.zip | tail -n +5 | xargs -r rm -f
ls -1dt $SERVICE_BACKUPS_DIR/$SERVICE_BACKUPS_PREFIX-*.$SERVICE_BACKUPS_EXTENSION | tail -n +5 | xargs -r rm -f