Add project context switch during ss-update.

This commit is contained in:
Derek Smith 2023-03-13 13:54:47 -04:00
parent 180cd1fa8d
commit 34c1edf27e
Signed by: farscapian
GPG Key ID: B443E530A14E1C90
2 changed files with 8 additions and 2 deletions

View File

@ -101,4 +101,4 @@ export PRIMARY_DOMAIN=
# this is the git commit of the project/ sub git repo. # this is the git commit of the project/ sub git repo.
# used in the migration script to switch into past for backup # used in the migration script to switch into past for backup
# then back to present (TARGET_PROJECT_GIT_COMMIT) for restore. # then back to present (TARGET_PROJECT_GIT_COMMIT) for restore.
export TARGET_PROJECT_GIT_COMMIT=c042ff404f02d3fc1739b325660411c68e3bf0b3 export TARGET_PROJECT_GIT_COMMIT=5e8cc9cee0555bd8736a3116cfa091c88030abba

View File

@ -30,4 +30,10 @@ if [ -z "$PRIMARY_DOMAIN" ]; then
exit 1 exit 1
fi fi
source "$PRIMARY_SITE_DEFINITION_PATH" source "$PRIMARY_SITE_DEFINITION_PATH"
if ! lxc info | grep "project:" | grep -q "$PROJECT_NAME"; then
if lxc project list | grep -q "$PROJECT_NAME"; then
lxc project switch "$PROJECT_NAME"
fi
fi