mirror of
https://github.com/YunoHost-Apps/plume_ynh.git
synced 2024-09-03 20:15:54 +02:00
fix secret key creation
This commit is contained in:
parent
0fdf14b9b5
commit
c6db1e0f8f
2 changed files with 4 additions and 4 deletions
|
@ -5,7 +5,7 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
# dependencies used by the app
|
# dependencies used by the app
|
||||||
pkg_dependencies="gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config"
|
pkg_dependencies="gettext postgresql postgresql-contrib libpq-dev git curl gcc make openssl libssl-dev pkg-config openssl"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# PERSONAL HELPERS
|
# PERSONAL HELPERS
|
||||||
|
|
|
@ -33,8 +33,6 @@ password=$YNH_APP_ARG_PASSWORD
|
||||||
instance_name=$YNH_APP_ARG_NAME
|
instance_name=$YNH_APP_ARG_NAME
|
||||||
registration=$YNH_APP_ARG_REGISTRATION
|
registration=$YNH_APP_ARG_REGISTRATION
|
||||||
admin_email=$(ynh_user_get_info $admin 'mail')
|
admin_email=$(ynh_user_get_info $admin 'mail')
|
||||||
secret_key=$(ynh_string_random 43)
|
|
||||||
secret_key="${secret_key}="
|
|
||||||
|
|
||||||
### If it's a multi-instance app, meaning it can be installed several times independently
|
### If it's a multi-instance app, meaning it can be installed several times independently
|
||||||
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
### The id of the app as stated in the manifest is available as $YNH_APP_ID
|
||||||
|
@ -77,7 +75,6 @@ ynh_app_setting_set $app is_public $is_public
|
||||||
ynh_app_setting_set $app instance $instance_name
|
ynh_app_setting_set $app instance $instance_name
|
||||||
ynh_app_setting_set $app registration $registration
|
ynh_app_setting_set $app registration $registration
|
||||||
ynh_app_setting_set $app admin_email $admin_email
|
ynh_app_setting_set $app admin_email $admin_email
|
||||||
ynh_app_setting_set $app secret_key $secret_key
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD MODIFICATIONS
|
# STANDARD MODIFICATIONS
|
||||||
|
@ -200,6 +197,9 @@ chown -R "$app":"$app" "/var/log/$app"
|
||||||
# MODIFY A CONFIG FILE
|
# MODIFY A CONFIG FILE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
|
secret_key=$(openssl rand -base64 32)
|
||||||
|
ynh_app_setting_set $app secret_key $secret_key
|
||||||
|
|
||||||
# setup application config
|
# setup application config
|
||||||
sudo cp "../conf/.env" "$final_path/$app/.env"
|
sudo cp "../conf/.env" "$final_path/$app/.env"
|
||||||
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/.env"
|
ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/.env"
|
||||||
|
|
Loading…
Add table
Reference in a new issue