Skip to content

Commit 21c1f09

Browse files
authored
Clear GitHub Connect settings when not restoring settings
1 parent f74c25a commit 21c1f09

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

bin/ghe-restore

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -345,6 +345,10 @@ if is_external_database_target_or_snapshot && $SKIP_MYSQL; then
345345
else
346346
echo "Restoring MySQL database from ${backup_snapshot_strategy} backup snapshot on an appliance configured for ${appliance_strategy} backups ..."
347347
ghe-restore-mysql "$GHE_HOSTNAME" 1>&3
348+
# Clear GitHub Connect settings stored in the restored database
349+
if ! $RESTORE_SETTINGS; then
350+
ghe-ssh "$GHE_HOSTNAME" -- "/usr/local/share/enterprise/ghe-reset-gh-connect -y"
351+
fi
348352
fi
349353

350354
if ghe-ssh "$GHE_HOSTNAME" -- 'ghe-config --true app.actions.enabled'; then

0 commit comments

Comments
 (0)