From 834a6d56dd4f276a54cf93960ee5abe55ebc866d Mon Sep 17 00:00:00 2001 From: orhtej2 <2871798+orhtej2@users.noreply.github.com> Date: Mon, 23 Oct 2023 21:31:19 +0200 Subject: [PATCH] Use dedicated domain. --- manifest.toml | 14 +++----------- scripts/change_url | 2 +- scripts/upgrade | 4 ++++ 3 files changed, 8 insertions(+), 12 deletions(-) diff --git a/manifest.toml b/manifest.toml index 129a930..c35de27 100644 --- a/manifest.toml +++ b/manifest.toml @@ -32,17 +32,7 @@ ram.runtime = "50M" [install.domain] # this is a generic question - ask strings are automatically handled by YunoHost's core type = "domain" - - [install.path] - # this is a generic question - ask strings are automatically handled by YunoHost's core - type = "path" - default = "/syncserver" - - [install.init_main_permission] - # this is a generic question - ask strings are automatically handled by YunoHost's core - # This won't be saved as setting and will instead be used to initialize the SSOwat permission - type = "group" - default = "visitors" + full_domain = true [resources] # See the packaging documentation for the full set @@ -69,6 +59,8 @@ ram.runtime = "50M" [resources.permissions] main.url = "/" main.show_tile = false + main.allowed = "visitors" + main.protected = true # This will pick a random port for reverse-proxying and store it as the $port setting [resources.ports] diff --git a/scripts/change_url b/scripts/change_url index f05d735..fcd0508 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -31,7 +31,7 @@ ynh_change_url_nginx_config # Retarget worker nodes #================================================= -ynh_mysql_execute_as_root --sql="UPDATE nodes set node='https://$new_domain$new_path' node url='https://$old_domain$old_path'" --database="$db_name_tokenserver"; +ynh_mysql_execute_as_root --sql="UPDATE nodes set node='https://$new_domain' WHERE node='https://$old_domain'" --database="$db_name_tokenserver"; #================================================= # GENERIC FINALISATION diff --git a/scripts/upgrade b/scripts/upgrade index f602693..36597da 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -91,6 +91,10 @@ ynh_add_nginx_config ynh_add_systemd_config +mkdir /var/log/$app +touch /var/log/$app/$app.log +chown -R $app: /var/log/$app + yunohost service add $app --description="Firefox Sync Server (Rust)" --log="/var/log/$app/$app.log" # Use logrotate to manage application logfile(s)