From e676c3be9346af1809fedbe12f2f0e29a49854e7 Mon Sep 17 00:00:00 2001 From: ericgaspar Date: Tue, 20 Apr 2021 18:36:16 +0200 Subject: [PATCH] test --- scripts/install | 3 ++- scripts/upgrade | 14 ++++++++++++-- 2 files changed, 14 insertions(+), 3 deletions(-) diff --git a/scripts/install b/scripts/install index 44120f3..14c9ffe 100755 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,6 @@ path_url="/" is_public=$YNH_APP_ARG_IS_PUBLIC admin=$YNH_APP_ARG_ADMIN password=$YNH_APP_ARG_PASSWORD -email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME @@ -124,6 +123,8 @@ ynh_systemd_action --service_name=nginx --action=reload # Installation with curl ynh_script_progression --message="Finalizing installation..." --weight=1 +email=$(ynh_user_get_info --username=$admin --key=mail) + ynh_local_curl "/cp-install" ynh_local_curl "/cp-install/create-superadmin" "email=$email" "username=$admin" "password=$password" diff --git a/scripts/upgrade b/scripts/upgrade index 45d5a8b..d548349 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -20,6 +20,7 @@ domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) final_path=$(ynh_app_setting_get --app=$app --key=final_path) db_name=$(ynh_app_setting_get --app=$app --key=db_name) +db_pwd=$(ynh_app_setting_get --app=$app --key=mysqlpwd) #================================================= # CHECK VERSION @@ -101,6 +102,13 @@ ynh_script_progression --message="Upgrading PHP-FPM configuration..." --weight=2 # Create a dedicated PHP-FPM config ynh_add_fpm_config --package="$extra_php_dependencies" +#================================================= +# CONFIGURE CASTOPOD +#================================================= +ynh_script_progression --message="Configuring Castopod..." --weight=1 + +ynh_add_config --template="../conf/.env.example" --destination="$final_path/.env" + #================================================= # SETUP CRON #================================================= @@ -115,8 +123,10 @@ ynh_add_config --template="../conf/cron" --destination="/etc/cron.d/$app" #================================================= # Set permissions to app files -chown -R $app:$app $final_path -chmod 600 $final_path/.env +chown -R $app:root $final_path +chown -R www-data:www-data $final_path/writable +chown -R www-data:www-data $final_path/public/media +#chmod 600 $final_path/.env #================================================= # RELOAD NGINX