diff options
| author | yalh76 <yalh@yahoo.com> | 2019-05-10 22:29:00 +0200 |
|---|---|---|
| committer | yalh76 <yalh@yahoo.com> | 2019-05-10 22:29:00 +0200 |
| commit | 750402c9c2c8bca9c172b67a5e78d2788f211c04 (patch) | |
| tree | d4ea1b0218afaf13b52154278daac9332a0b57ff /scripts | |
| parent | 9719db911b1cbd6c4ad06dc34c3295b87cfc43f3 (diff) | |
| download | mastodon_ynh-750402c9c2c8bca9c172b67a5e78d2788f211c04.tar.gz mastodon_ynh-750402c9c2c8bca9c172b67a5e78d2788f211c04.tar.bz2 mastodon_ynh-750402c9c2c8bca9c172b67a5e78d2788f211c04.zip | |
removing vapid_private_key
Diffstat (limited to 'scripts')
| -rw-r--r-- | scripts/upgrade | 20 |
1 files changed, 10 insertions, 10 deletions
diff --git a/scripts/upgrade b/scripts/upgrade index 53fcfb8..46e13a6 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -243,16 +243,16 @@ pushd "$final_path/live" popd # If vapid_private_key doesn't exist, retrieve it or create it -if [[ -z "$vapid_private_key" ]]; then - sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt - vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K\w+" "$final_path/live/key.txt") - vapid_public_key=$(grep -oP "VAPID_PUBLIC_KEY=\K\w+" "$final_path/live/key.txt") - ynh_app_setting_set "$app" vapid_private_key "$vapid_private_key" - ynh_app_setting_set "$app" vapid_public_key "$vapid_public_key" - ynh_secure_remove "$final_path/live/key.txt" - ynh_replace_string "__VAPID_PRIVATE_KEY__" "$vapid_private_key" "${final_path}/live/.env.production" - ynh_replace_string "__VAPID_PUBLIC_KEY__" "$vapid_public_key" "${final_path}/live/.env.production" -fi +#if [[ -z "$vapid_private_key" ]]; then +# sudo -u "$app" env PATH=$PATH RAILS_ENV=production /opt/rbenv/versions/2.6.0/bin/bundle exec rake mastodon:webpush:generate_vapid_key > key.txt +# vapid_private_key=$(grep -oP "VAPID_PRIVATE_KEY=\K\w+" "$final_path/live/key.txt") +# vapid_public_key=$(grep -oP "VAPID_PUBLIC_KEY=\K\w+" "$final_path/live/key.txt") +# ynh_app_setting_set "$app" vapid_private_key "$vapid_private_key" +# ynh_app_setting_set "$app" vapid_public_key "$vapid_public_key" +# ynh_secure_remove "$final_path/live/key.txt" +# ynh_replace_string "__VAPID_PRIVATE_KEY__" "$vapid_private_key" "${final_path}/live/.env.production" +# ynh_replace_string "__VAPID_PUBLIC_KEY__" "$vapid_public_key" "${final_path}/live/.env.production" +#fi # Recalculate and store the checksum of the file for the next upgrade. ynh_store_file_checksum "${final_path}/live/.env.production" |
