mirror of
https://github.com/YunoHost-Apps/pleroma_ynh.git
synced 2024-09-03 20:15:59 +02:00
Fix Key Gen
This commit is contained in:
parent
dcb6b7779c
commit
a8f3e6e8bf
2 changed files with 6 additions and 6 deletions
|
@ -267,6 +267,10 @@ fi
|
||||||
chown -R "$app":"$app" "$final_path"
|
chown -R "$app":"$app" "$final_path"
|
||||||
|
|
||||||
pushd $final_path/$app
|
pushd $final_path/$app
|
||||||
|
#Generate key pair
|
||||||
|
sudo -u "$app" MIX_ENV=prod mix web_push.gen.keypair >> "config/prod.secret.web_push.exs"
|
||||||
|
ynh_replace_string "administrator@example.com" "$admin_email" "$final_path/$app/config/prod.secret.web_push.exs"
|
||||||
|
|
||||||
# App setup and db migration
|
# App setup and db migration
|
||||||
sudo -u "$app" MIX_ENV=prod mix local.hex --force
|
sudo -u "$app" MIX_ENV=prod mix local.hex --force
|
||||||
sudo -u "$app" MIX_ENV=prod mix local.rebar --force
|
sudo -u "$app" MIX_ENV=prod mix local.rebar --force
|
||||||
|
@ -275,10 +279,6 @@ pushd $final_path/$app
|
||||||
|
|
||||||
# Add user
|
# Add user
|
||||||
sudo -u "$app" MIX_ENV=prod mix pleroma.user new "$admin" "$admin_email" --password "$password" --moderator --admin -y
|
sudo -u "$app" MIX_ENV=prod mix pleroma.user new "$admin" "$admin_email" --password "$password" --moderator --admin -y
|
||||||
|
|
||||||
#Generate key pair
|
|
||||||
sudo -u "$app" MIX_ENV=prod mix web_push.gen.keypair >> "config/prod.secret.web_push.exs"
|
|
||||||
ynh_replace_string "administrator@example.com" "$admin_email" "$final_path/$app/config/prod.secret.web_push.exs"
|
|
||||||
popd
|
popd
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -213,14 +213,14 @@ fi
|
||||||
# Give permission to the final_path
|
# Give permission to the final_path
|
||||||
chown -R "$app":"$app" "$final_path"
|
chown -R "$app":"$app" "$final_path"
|
||||||
pushd $final_path/$app
|
pushd $final_path/$app
|
||||||
sudo -u "$app" MIX_ENV=prod mix deps.get
|
|
||||||
sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force
|
|
||||||
if [ ! -f "$final_path/$app/config/prod.secret.web_push.exs" ]
|
if [ ! -f "$final_path/$app/config/prod.secret.web_push.exs" ]
|
||||||
then
|
then
|
||||||
#Generate key pair
|
#Generate key pair
|
||||||
sudo -u "$app" MIX_ENV=prod mix web_push.gen.keypair >> "config/prod.secret.web_push.exs"
|
sudo -u "$app" MIX_ENV=prod mix web_push.gen.keypair >> "config/prod.secret.web_push.exs"
|
||||||
ynh_replace_string "administrator@example.com" "$admin_email" "$final_path/$app/config/prod.secret.web_push.exs"
|
ynh_replace_string "administrator@example.com" "$admin_email" "$final_path/$app/config/prod.secret.web_push.exs"
|
||||||
fi
|
fi
|
||||||
|
sudo -u "$app" MIX_ENV=prod mix deps.get
|
||||||
|
sudo -u "$app" MIX_ENV=prod mix ecto.migrate --force
|
||||||
popd
|
popd
|
||||||
|
|
||||||
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
### Verify the checksum of a file, stored by `ynh_store_file_checksum` in the install script.
|
||||||
|
|
Loading…
Add table
Reference in a new issue