Changed: allow check_subscription to fail before installing passbolt

This commit is contained in:
Daniel Del Rio Figueira 2021-04-29 17:52:31 +02:00
parent c2173e37e2
commit dc16792bed
No known key found for this signature in database
GPG Key ID: DCB25219AF061D1B
1 changed files with 14 additions and 3 deletions

View File

@ -91,10 +91,21 @@ get_subscription_file() {
check_subscription() { check_subscription() {
if get_subscription_file; then if get_subscription_file; then
su -c "/usr/share/php/passbolt/bin/cake passbolt subscription_import $SUBSCRIPTION_FILE" -s /bin/bash www-data echo "Subscription file found: $SUBSCRIPTION_FILE"
su -c "/usr/share/php/passbolt/bin/cake passbolt subscription_import --file $SUBSCRIPTION_FILE" -s /bin/bash www-data
fi fi
} }
install_command() {
echo "Installing passbolt"
su -c '/usr/share/php/passbolt/bin/cake passbolt install --no-admin' -s /bin/bash www-data
}
migrate_command() {
echo "Running migrations"
su -c '/usr/share/php/passbolt/bin/cake passbolt migrate' -s /bin/bash www-data
}
install() { install() {
if [ ! -f "$passbolt_config/app.php" ]; then if [ ! -f "$passbolt_config/app.php" ]; then
su -c "cp $passbolt_config/app.default.php $passbolt_config/app.php" -s /bin/bash www-data su -c "cp $passbolt_config/app.default.php $passbolt_config/app.php" -s /bin/bash www-data
@ -105,9 +116,9 @@ install() {
export PASSBOLT_GPG_SERVER_KEY_FINGERPRINT=$gpg_auto_fingerprint export PASSBOLT_GPG_SERVER_KEY_FINGERPRINT=$gpg_auto_fingerprint
fi fi
check_subscription check_subscription || true
su -c '/usr/share/php/passbolt/bin/cake passbolt install --no-admin' -s /bin/bash www-data || su -c '/usr/share/php/passbolt/bin/cake passbolt migrate' -s /bin/bash www-data && echo "Enjoy! ☮" install_command || migrate_command && echo "Enjoy! ☮"
} }
create_deprecation_message() { create_deprecation_message() {