diff --git a/scripts/change_url b/scripts/change_url index f8d06ff..9afe639 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -101,12 +101,6 @@ then ynh_store_file_checksum --file="/etc/nginx/conf.d/$new_domain.d/$app.conf" fi -#================================================= -# SPECIFIC MODIFICATIONS -#================================================= -# ... -#================================================= - #================================================= # RELOAD NGINX #================================================= diff --git a/scripts/install b/scripts/install index 1095955..6c75f8b 100755 --- a/scripts/install +++ b/scripts/install @@ -26,8 +26,7 @@ path_url=$YNH_APP_ARG_PATH admin=$YNH_APP_ARG_ADMIN is_public=$YNH_APP_ARG_IS_PUBLIC random_key=$(ynh_string_random --length=32) - -email=$(ynh_user_get_info $admin 'mail') +email=$(ynh_user_get_info --username=$admin --key=mail) app=$YNH_APP_INSTANCE_NAME @@ -198,8 +197,6 @@ ynh_script_progression --message="Configuring permissions..." # Make app public if necessary if [ $is_public -eq 1 ] then - # Everyone can access the app. - # The "main" permission is automatically created before the install script. ynh_permission_update --permission="main" --add="visitors" fi diff --git a/scripts/upgrade b/scripts/upgrade index c8eb570..ccac2ed 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -25,7 +25,7 @@ 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) random_key=$(ynh_app_setting_get --app=$app --key=random_key) -email=$(ynh_user_get_info $admin 'mail') +email=$(ynh_user_get_info --username=$admin --key=mail) #================================================= # CHECK VERSION @@ -104,18 +104,15 @@ then cp -a "$final_path/storage/export/" "$tmpdir/storage/export/" ynh_secure_remove --file="$final_path" - # Download, check integrity, uncompress and patch the source from app.src ynh_setup_source --dest_dir="$final_path" # Restore the config file cp -a "$tmpdir/storage/upload/" "$final_path/storage/upload/" cp -a "$tmpdir/storage/export/" "$final_path/storage/export/" - cp -a "$tmpdir/.env" "$final_path/.env" + cp -a "$tmpdir/.env" "$final_path/.env" # Remove temporary directory ynh_secure_remove --file="$tmpdir" - - fi #================================================= @@ -157,7 +154,7 @@ phpversion=$(ynh_app_setting_get --app=$app --key=phpversion) #================================================= ynh_script_progression --message="Updating PHP dependencies..." -chown -R $app: "$final_path" +chown -R $app: $final_path ynh_exec_warn_less ynh_install_composer --phpversion="$phpversion" --workdir="$final_path" @@ -199,15 +196,12 @@ ynh_store_file_checksum --file="$config" ynh_script_progression --message="Deploying..." pushd "$final_path" - - rm -rf bootstrap/cache/* + ynh_secure_remove --file="bootstrap/cache/*" php$phpversion artisan cache:clear php$phpversion artisan migrate --seed php$phpversion artisan firefly-iii:upgrade-database php$phpversion artisan passport:install php$phpversion artisan cache:clear - - popd #================================================= @@ -227,7 +221,7 @@ ynh_script_progression --message="Securing files and directories..." # Set permissions on app files chown -R $app: $final_path -chmod -R 775 ${final_path}/storage +chmod -R 775 $final_path/storage #================================================= # SETUP A CRON