From 313b4ae5278fdf8e7a57642e2863149ebfb57dd9 Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?E=CC=81ric=20Gaspar?= <46165813+ericgaspar@users.noreply.github.com> Date: Mon, 2 Sep 2024 21:07:39 +0200 Subject: [PATCH] cleaning --- manifest.toml | 2 +- scripts/_common.sh | 2 -- scripts/backup | 1 - scripts/install | 4 ---- scripts/remove | 2 +- scripts/restore | 6 ------ scripts/upgrade | 3 --- 7 files changed, 2 insertions(+), 18 deletions(-) diff --git a/manifest.toml b/manifest.toml index 718509a..75a18c2 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,7 @@ cpe = "cpe:2.3:a:simplex:simplex_chat" fund = "https://opencollective.com/simplex-chat" [integration] -yunohost = ">= 11.2.18" +yunohost = ">= 11.2.29" helpers_version = "2.1" architectures = ["amd64", "arm64"] multi_instance = false diff --git a/scripts/_common.sh b/scripts/_common.sh index 253c6fe..3d7f008 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -3,5 +3,3 @@ #================================================= # COMMON VARIABLES AND CUSTOM HELPERS #================================================= -# PHP APP SPECIFIC -#================================================= diff --git a/scripts/backup b/scripts/backup index 5c334b6..8c618fb 100755 --- 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 diff --git a/scripts/install b/scripts/install index 43a6e54..fb062a4 100755 --- a/scripts/install +++ b/scripts/install @@ -22,8 +22,6 @@ ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" mkdir -p /etc/opt/simplex-xftp /etc/opt/simplex /var/opt/simplex-xftp /var/opt/simplex chown -R $app:$app /etc/opt/simplex-xftp /etc/opt/simplex /var/opt/simplex-xftp /var/opt/simplex -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:$app "$install_dir" chmod +x $install_dir/smp-server chmod +x $install_dir/xftp-server @@ -65,7 +63,6 @@ chown -R $app:$app "/etc/opt/simplex-xftp" #================================================= ynh_script_progression "Adding system configurations related to $app..." -# Create a dedicated systemd config ynh_config_add_systemd ynh_config_add_systemd --service=xftp --template=../conf/xftp.systemd.service @@ -77,7 +74,6 @@ yunohost service add xftp --description="Messaging platform" --log="/var/log/$ap #================================================= ynh_script_progression "Starting $app's systemd service..." -# Start a systemd service ynh_systemctl --service=$app --action="start" --log_path="systemd" ynh_systemctl --service="xftp" --action="start" --log_path="systemd" diff --git a/scripts/remove b/scripts/remove index f983d18..ca597cd 100755 --- a/scripts/remove +++ b/scripts/remove @@ -18,7 +18,7 @@ fi # Remove the dedicated systemd config ynh_config_remove_systemd -ynh_config_remove_systemdxftp +ynh_config_remove_systemd xftp # Remove the app directory securely ynh_safe_rm "/etc/opt/simplex" diff --git a/scripts/restore b/scripts/restore index bdf54ea..194d57d 100755 --- a/scripts/restore +++ b/scripts/restore @@ -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 @@ -11,8 +10,6 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" #================================================= # RESTORE THE DATA DIRECTORY #================================================= @@ -20,14 +17,11 @@ ynh_script_progression "Restoring the data directory..." ynh_restore "$data_dir" -# (Same as for install dir) chown -R $app:www-data "$data_dir" #================================================= # RESTORE SYSTEM CONFIGURATIONS #================================================= -# RESTORE THE PHP-FPM CONFIGURATION -#================================================= ynh_script_progression "Restoring system configurations related to $app..." ynh_restore "/etc/opt/simplex" diff --git a/scripts/upgrade b/scripts/upgrade index 5df3cb6..f781293 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -30,8 +30,6 @@ ynh_script_progression "Upgrading source files..." ynh_setup_source --dest_dir="$install_dir" ynh_setup_source --dest_dir="$install_dir" --source_id="xftp" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod -R o-rwx "$install_dir" -#REMOVEME? Assuming the install dir is setup using ynh_setup_source, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown -R $app:www-data "$install_dir" chmod +x $install_dir/smp-server chmod +x $install_dir/xftp-server @@ -73,7 +71,6 @@ fi #================================================= ynh_script_progression "Upgrading system configurations related to $app..." -# Create a dedicated systemd config ynh_config_add_systemd ynh_config_add_systemd --service=xftp --template=../conf/xftp.systemd.service