diff --git a/scripts/_common.sh b/scripts/_common.sh index c5d4d5a..aa40270 100755 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -5,7 +5,7 @@ #================================================= # 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 diff --git a/scripts/install b/scripts/install index 9ea734b..7cc05af 100755 --- a/scripts/install +++ b/scripts/install @@ -33,8 +33,6 @@ password=$YNH_APP_ARG_PASSWORD instance_name=$YNH_APP_ARG_NAME registration=$YNH_APP_ARG_REGISTRATION 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 ### 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 registration $registration ynh_app_setting_set $app admin_email $admin_email -ynh_app_setting_set $app secret_key $secret_key #================================================= # STANDARD MODIFICATIONS @@ -200,6 +197,9 @@ chown -R "$app":"$app" "/var/log/$app" # MODIFY A CONFIG FILE #================================================= +secret_key=$(openssl rand -base64 32) +ynh_app_setting_set $app secret_key $secret_key + # setup application config sudo cp "../conf/.env" "$final_path/$app/.env" ynh_replace_string "__DB_NAME__" "$db_name" "$final_path/$app/.env"