diff --git a/manifest.toml b/manifest.toml index 1a21ffc..c79283a 100644 --- a/manifest.toml +++ b/manifest.toml @@ -16,7 +16,7 @@ admindoc = "https://github.com/matrix-org/dendrite/tree/master/docs" code = "https://github.com/matrix-org/dendrite" [integration] -yunohost = ">= 11.1.16" +yunohost = ">= 11.1.17" architectures = "all" multi_instance = false ldap = "not_relevant" diff --git a/scripts/change_url b/scripts/change_url index 840d45e..17b0a2a 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -34,7 +34,7 @@ fi #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="/var/log/$app/$app.log" #================================================= # MODIFY URL IN NGINX CONF @@ -61,7 +61,7 @@ ynh_add_systemd_config ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/config b/scripts/config index 2ea3ea5..cd8d25e 100644 --- a/scripts/config +++ b/scripts/config @@ -9,23 +9,6 @@ source _common.sh source /usr/share/yunohost/helpers -ynh_abort_if_errors - -#================================================= -# RETRIEVE ARGUMENTS -#================================================= - -domain=$(ynh_app_setting_get --app=$app --key=domain) -server_name=$(ynh_app_setting_get --app=$app --key=server_name) -path_url=$(ynh_app_setting_get --app=$app --key=path) -final_path=$(ynh_app_setting_get --app=$app --key=final_path) -port=$(ynh_app_setting_get --app=$app --key=port) -tls_port=$(ynh_app_setting_get --app=$app --key=tls_port) -db_name=$(ynh_app_setting_get --app=$app --key=db_name) -db_user=$db_name -db_pwd=$(ynh_app_setting_get --app=$app --key=psqlpwd) -#registration is not loaded since it's set up by the config panel - #================================================= # GENERIC FINALIZATION #================================================= @@ -44,9 +27,9 @@ ynh_app_config_apply() { really_enable_open_registration="" fi - ynh_add_config --template="../conf/dendrite.yaml" --destination="$final_path/dendrite.yaml" + ynh_add_config --template="../conf/dendrite.yaml" --destination="$install_dir/dendrite.yaml" ynh_add_systemd_config - ynh_systemd_action --service_name=$app --action="restart" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/$app.log" + ynh_systemd_action --service_name=$app --action="restart" --line_match="Cleaning old notifications" --log_path="systemd" ynh_app_setting_set --app=$app --key=registration --value=$registration fi diff --git a/scripts/install b/scripts/install index c148d2a..8272942 100644 --- a/scripts/install +++ b/scripts/install @@ -137,7 +137,7 @@ ynh_replace_string --match_string="/var/log/$app/*.log" --replace_string="/var/l #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$port_tls" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port_tls" #================================================= # START SYSTEMD SERVICE @@ -145,7 +145,7 @@ yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var ynh_script_progression --message="Starting a systemd service..." --weight=1 # Start a systemd service -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 5d103a1..6fb0d58 100644 --- a/scripts/restore +++ b/scripts/restore @@ -66,14 +66,14 @@ ynh_restore_file --origin_path="/etc/logrotate.d/$app" #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$port_tls" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port_tls" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # GENERIC FINALIZATION diff --git a/scripts/upgrade b/scripts/upgrade index 59aa843..cb48885 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -23,7 +23,7 @@ upgrade_type=$(ynh_check_app_version_changed) #================================================= ynh_script_progression --message="Stopping a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="stop" --line_match="Dendrite is exiting now" --log_path="systemd" #================================================= # ENSURE DOWNWARD COMPATIBILITY @@ -37,7 +37,7 @@ fi # Define $server_name if not already defined if [ -z $server_name ]; then server_name=$domain -#REMOVEME? ynh_app_setting_set --app=$app --key=server_name --value=$domain + ynh_app_setting_set --app=$app --key=server_name --value=$domain fi # Load up registration variables @@ -145,14 +145,14 @@ ynh_use_logrotate --non-append #================================================= ynh_script_progression --message="Integrating service in YunoHost..." --weight=1 -yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/Monolith.log" --needs_exposed_ports "$port_tls" +yunohost service add $app --description="Dendrite Matrix homeserver" --log="/var/log/$app/$app.log" --needs_exposed_ports "$port_tls" #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression --message="Starting a systemd service..." --weight=1 -ynh_systemd_action --service_name=$app --action="start" --line_match="Starting external Monolith listener" --log_path="/var/log/$app/Monolith.log" +ynh_systemd_action --service_name=$app --action="start" --line_match="Cleaning old notifications" --log_path="systemd" #================================================= # END OF SCRIPT diff --git a/scripts/ynh_install_go b/scripts/ynh_install_go index 1146945..f801501 100644 --- a/scripts/ynh_install_go +++ b/scripts/ynh_install_go @@ -30,7 +30,7 @@ export GOENV_ROOT="$goenv_install_dir" # However, $PATH is duplicated into $go_path to outlast any manipulation of $PATH # You can use the variable `$ynh_go_load_path` to quickly load your Go version # in $PATH for an usage into a separate script. -# Exemple: $ynh_go_load_path $final_path/script_that_use_gem.sh` +# Exemple: $ynh_go_load_path $install_dir/script_that_use_gem.sh` # # # Finally, to start a Go service with the correct version, 2 solutions