1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yacy_ynh.git synced 2024-09-03 18:05:59 +02:00

Upgrade to 1.924~ynh1

This commit is contained in:
yalh76 2022-07-07 01:34:43 +02:00
parent ca4d54e5e6
commit ae042383c6
6 changed files with 22 additions and 27 deletions

View file

@ -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.

View file

@ -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",

View file

@ -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

View file

@ -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"

View file

@ -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
#=================================================

View file

@ -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
#=================================================