Skip to content

Commit

Permalink
Merge pull request freedomofpress#3737 from freedomofpress/3732-resto…
Browse files Browse the repository at this point in the history
…re-db-migrations

Apply database migration on backup restore
  • Loading branch information
redshiftzero authored Aug 27, 2018
2 parents b06c656 + 0f2ce05 commit 0c6e184
Showing 1 changed file with 2 additions and 0 deletions.
2 changes: 2 additions & 0 deletions install_files/ansible-base/roles/restore/files/restore.py
Original file line number Diff line number Diff line change
Expand Up @@ -45,6 +45,8 @@ def main():
# If the process exits with a non-zero return code, raises an exception.
subprocess.check_call(['service', 'apache2', 'restart'])
subprocess.check_call(['service', 'tor', 'reload'])
# Apply database migrations (if backed-up version < version to restore)
subprocess.check_call(['dpkg-reconfigure', 'securedrop-app-code'])


if __name__ == "__main__":
Expand Down

0 comments on commit 0c6e184

Please sign in to comment.