diff --git a/check_process b/check_process index 78ce1da..1dbabd7 100644 --- a/check_process +++ b/check_process @@ -2,6 +2,7 @@ ; Manifest domain="domain.tld" path="/path" + password="1Strong-Password" ; Checks pkg_linter=1 setup_sub_dir=1 @@ -10,7 +11,8 @@ setup_private=0 setup_public=0 upgrade=1 - #upgrade=1 from_commit=CommitHash + # 1.0~ynh1 + upgrade=1 from_commit=ca4d54e5e6c1bc7d772e375f6193b46f886034a5 backup_restore=1 multi_instance=0 port_already_use=0 @@ -18,6 +20,3 @@ ;;; Options Email= Notification=none -;;; Upgrade options - ; commit=CommitHash - name=Name and date of the commit. diff --git a/manifest.json b/manifest.json index 26b2801..ab3d4f3 100644 --- a/manifest.json +++ b/manifest.json @@ -6,7 +6,7 @@ "en": "Free and decentralized search engine", "fr": "Moteur de recherche libre et décentralisé" }, - "version": "1.0~ynh1", + "version": "1.924~ynh1", "url": "https://yacy.net/", "upstream": { "license": "free", diff --git a/scripts/backup b/scripts/backup index da811a8..d8cb0be 100644 --- a/scripts/backup +++ b/scripts/backup @@ -15,7 +15,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_clean_setup () { - ynh_clean_check_starting + true } # Exit if an error occurs during the execution of the script ynh_abort_if_errors diff --git a/scripts/install b/scripts/install index 25fd68f..11617b0 100644 --- a/scripts/install +++ b/scripts/install @@ -25,7 +25,7 @@ ynh_abort_if_errors domain=$YNH_APP_ARG_DOMAIN path_url=$YNH_APP_ARG_PATH -password=$YNH_APP_ARG_PASSWORD +password="$YNH_APP_ARG_PASSWORD" app=$YNH_APP_INSTANCE_NAME @@ -126,7 +126,7 @@ ynh_script_progression --message="Configuring Yacy..." ynh_systemd_action --service_name=$app --action="start" --log_path="$datadir/DATA/LOG/yacy00.log" --line_match="Started httpd:" -ynh_exec_as $app YACY_DATA_PATH=$datadir/DATA $final_path/bin/passwd.sh $password +ynh_exec_as $app YACY_DATA_PATH=$datadir/DATA $final_path/bin/passwd.sh "$password" ynh_systemd_action --service_name=$app --action="stop" --log_path="$datadir/DATA/LOG/yacy00.log" diff --git a/scripts/restore b/scripts/restore index 9a75a92..f68ac69 100644 --- a/scripts/restore +++ b/scripts/restore @@ -42,13 +42,6 @@ test ! -d $final_path \ #================================================= # STANDARD RESTORATION STEPS -#================================================= -# RESTORE THE NGINX CONFIGURATION -#================================================= -ynh_script_progression --message="Restoring the NGINX web server configuration..." - -ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" - #================================================= # RECREATE THE DEDICATED USER #================================================= @@ -91,6 +84,13 @@ ynh_script_progression --message="Reinstalling dependencies..." # Define and install dependencies ynh_install_app_dependencies $pkg_dependencies +#================================================= +# RESTORE THE NGINX CONFIGURATION +#================================================= +ynh_script_progression --message="Restoring the NGINX web server configuration..." + +ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf" + #================================================= # RESTORE SYSTEMD #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6a74702..c8a6b00 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -18,9 +18,9 @@ app=$YNH_APP_INSTANCE_NAME domain=$(ynh_app_setting_get --app=$app --key=domain) path_url=$(ynh_app_setting_get --app=$app --key=path) +language=$(ynh_app_setting_get --app=$app --key=language) admin=$(ynh_app_setting_get --app=$app --key=admin) final_path=$(ynh_app_setting_get --app=$app --key=final_path) -language=$(ynh_app_setting_get --app=$app --key=language) datadir=$(ynh_app_setting_get --app=$app --key=datadir) port=$(ynh_app_setting_get --app=$app --key=port) @@ -91,6 +91,13 @@ chmod 750 "$final_path" chmod -R o-rwx "$final_path" chown -R $app:www-data "$final_path" +#================================================= +# UPGRADE DEPENDENCIES +#================================================= +ynh_script_progression --message="Upgrading dependencies..." + +ynh_install_app_dependencies $pkg_dependencies + #================================================= # NGINX CONFIGURATION #================================================= @@ -99,19 +106,8 @@ ynh_script_progression --message="Upgrading NGINX web server configuration..." # Create a dedicated NGINX config ynh_add_nginx_config -#================================================= -# UPGRADE DEPENDENCIES -#================================================= -ynh_script_progression --message="Upgrading dependencies..." - -ynh_install_app_dependencies $pkg_dependencies - #================================================= # SPECIFIC UPGRADE -#================================================= -# ... -#================================================= - #================================================= # UPDATE A CONFIG FILE #=================================================