From 150c4e34f61c77bdd669324b9ee5cd0d46e04dcd Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Sun, 1 Sep 2024 12:45:07 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/backup | 7 ------- scripts/install | 2 +- scripts/remove | 7 ------- scripts/restore | 1 - scripts/upgrade | 1 - 6 files changed, 2 insertions(+), 18 deletions(-) diff --git a/manifest.toml b/manifest.toml index 61c4a88..f005d82 100644 --- a/manifest.toml +++ b/manifest.toml @@ -15,7 +15,7 @@ admindoc = "https://github.com/coturn/coturn/wiki" code = "https://github.com/coturn/coturn" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = "all" multi_instance = false diff --git a/scripts/backup b/scripts/backup index 28c5202..a388a00 100644 --- a/scripts/backup +++ b/scripts/backup @@ -1,6 +1,5 @@ #!/bin/bash -# Keep this path for calling _common.sh inside the execution's context of backup and restore scripts source ../settings/scripts/_common.sh source /usr/share/yunohost/helpers @@ -21,17 +20,11 @@ ynh_backup "$data_dir" #================================================= # SPECIFIC BACKUP #================================================= -# BACKUP LOGROTATE -#================================================= ynh_backup "/var/log/$app" ynh_backup "/etc/cron.d/$app" -#================================================= -# BACKUP SYSTEMD -#================================================= - ynh_backup "/etc/systemd/system/$app.service" #================================================= diff --git a/scripts/install b/scripts/install index eb66f83..68ed348 100644 --- a/scripts/install +++ b/scripts/install @@ -46,7 +46,7 @@ ynh_config_add_systemd #================================================= # SET COTURN CONFIG #================================================= -ynh_script_progression "Configuring Coturn..." +ynh_script_progression "Configuring $app..." # Find password for turnserver turnserver_pwd=$(ynh_string_random --length=30) diff --git a/scripts/remove b/scripts/remove index a5c9e2a..cd5e1bd 100644 --- a/scripts/remove +++ b/scripts/remove @@ -6,26 +6,20 @@ source /usr/share/yunohost/helpers #================================================= # STANDARD REMOVE #================================================= -# REMOVE SERVICE INTEGRATION IN YUNOHOST -#================================================= ynh_script_progression "Removing system configurations related to $app..." -# Remove the service from the list of services known by YunoHost (added from `yunohost service add`) if ynh_hide_warnings yunohost service status $app >/dev/null then ynh_script_progression "Removing $app service integration..." yunohost service remove $app fi -# Remove the dedicated systemd config ynh_config_remove_systemd ynh_safe_rm "/etc/turnserver.conf" -# Remove the app-specific logrotate config ynh_config_remove_logrotate -# Remove a cron file ynh_safe_rm /etc/cron.d/$app #================================================= @@ -33,7 +27,6 @@ ynh_safe_rm /etc/cron.d/$app #================================================= ynh_script_progression "Removing the dedicated system user..." -# Delete a system user deluser turnserver ssl-cert #================================================= diff --git a/scripts/restore b/scripts/restore index 70b88d0..d2f5702 100644 --- a/scripts/restore +++ b/scripts/restore @@ -17,7 +17,6 @@ ynh_script_progression "Restoring the data directory..." ynh_restore "$data_dir" -# (Same as for install dir) chown -R $app:www-data "$data_dir" #================================================= diff --git a/scripts/upgrade b/scripts/upgrade index 6999910..e4e2471 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -92,7 +92,6 @@ ynh_config_add_logrotate "/var/log/$app" # Set permissions to app files chown root: -R $data_dir -#REMOVEME? Assuming ynh_config_add_logrotate is called, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R turnserver:root /var/log/$app chown turnserver:root /etc/turnserver.conf setfacl -R -m user:turnserver:rwX /var/log/$app