Fix update scripts: pixelfed storage backup, github-runner full config backup, forgejo-runner version check
This commit is contained in:
@@ -40,15 +40,17 @@ function update_script() {
|
||||
msg_info "Backing up runner configuration"
|
||||
BACKUP_DIR="/opt/actions-runner.backup"
|
||||
mkdir -p "$BACKUP_DIR"
|
||||
[[ -f /opt/actions-runner/.runner ]] && cp -a /opt/actions-runner/.runner "$BACKUP_DIR/"
|
||||
[[ -f /opt/actions-runner/.credentials ]] && cp -a /opt/actions-runner/.credentials "$BACKUP_DIR/"
|
||||
for f in .runner .credentials .credentials_rsaparams .env .path; do
|
||||
[[ -f /opt/actions-runner/$f ]] && cp -a /opt/actions-runner/$f "$BACKUP_DIR/"
|
||||
done
|
||||
msg_ok "Backed up configuration"
|
||||
|
||||
CLEAN_INSTALL=1 fetch_and_deploy_gh_release "actions-runner" "actions/runner" "prebuild" "latest" "/opt/actions-runner" "actions-runner-linux-x64-*.tar.gz"
|
||||
|
||||
msg_info "Restoring runner configuration"
|
||||
[[ -f "$BACKUP_DIR/.runner" ]] && cp -a "$BACKUP_DIR/.runner" /opt/actions-runner/
|
||||
[[ -f "$BACKUP_DIR/.credentials" ]] && cp -a "$BACKUP_DIR/.credentials" /opt/actions-runner/
|
||||
for f in .runner .credentials .credentials_rsaparams .env .path; do
|
||||
[[ -f "$BACKUP_DIR/$f" ]] && cp -a "$BACKUP_DIR/$f" /opt/actions-runner/
|
||||
done
|
||||
rm -rf "$BACKUP_DIR"
|
||||
msg_ok "Restored configuration"
|
||||
|
||||
|
||||
Reference in New Issue
Block a user