From a05df038c99dbb3d32b74057b344a45f9c23ad76 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 01:05:42 +0200 Subject: [PATCH] [autopatch] Automatic patch attempt for helpers 2.1 --- manifest.toml | 2 +- scripts/change_url | 4 ++-- scripts/install | 8 ++++---- scripts/restore | 5 ++--- scripts/upgrade | 10 +++++----- 5 files changed, 14 insertions(+), 15 deletions(-) diff --git a/manifest.toml b/manifest.toml index 943305c..5d6360c 100644 --- a/manifest.toml +++ b/manifest.toml @@ -19,7 +19,7 @@ code = "https://github.com/szabodanika/microbin" fund = "https://ko-fi.com/dani_sz" [integration] -yunohost = ">= 11.2.16" +yunohost = ">= 11.2.18" helpers_version = "2.1" architectures = "all" multi_instance = true diff --git a/scripts/change_url b/scripts/change_url index 82d62b8..544511d 100644 --- a/scripts/change_url +++ b/scripts/change_url @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Stopping $app's systemd service..." -ynh_systemctl --service="$app" --action="stop" +ynh_systemctl --action="stop" #================================================= # MODIFY URL IN NGINX CONF @@ -26,7 +26,7 @@ ynh_config_change_url_nginx #================================================= ynh_script_progression "Starting $app's systemd service..." -ynh_systemctl --service="$app" --action="start" +ynh_systemctl --action="start" #================================================= # END OF SCRIPT diff --git a/scripts/install b/scripts/install index 7b8d36f..9f785eb 100755 --- a/scripts/install +++ b/scripts/install @@ -21,7 +21,7 @@ ynh_script_progression "Setting up source files..." ynh_setup_source --dest_dir="$install_dir" -chown -R "$app:www-data" "$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/microbin" #================================================= @@ -31,8 +31,8 @@ ynh_script_progression "Adding $app's configuration files..." ynh_config_add --template=".env" --destination="$install_dir/.env" -chmod 400 "$install_dir/.env" -chown "$app:$app" "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/.env" #================================================= # SYSTEM CONFIGURATION @@ -51,7 +51,7 @@ yunohost service add "$app" --description="Configurable file-sharing app" --log= ynh_script_progression "Starting $app's systemd service..." # Start a systemd service -ynh_systemctl --service="$app" --action="start" +ynh_systemctl --action="start" #================================================= # END OF SCRIPT diff --git a/scripts/restore b/scripts/restore index 79ae52f..d95097c 100755 --- a/scripts/restore +++ b/scripts/restore @@ -14,8 +14,7 @@ ynh_script_progression "Restoring the app main directory..." ynh_restore "$install_dir" -chown -R "$app:www-data" "$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 #================================================= @@ -42,7 +41,7 @@ yunohost service add "$app" --description="Configurable file-sharing app" --log= #================================================= ynh_script_progression "Reloading NGINX web server and $app's service..." -ynh_systemctl --service="$app" --action="start" +ynh_systemctl --action="start" ynh_systemctl --service=nginx --action=reload diff --git a/scripts/upgrade b/scripts/upgrade index a498add..e5bee48 100755 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -12,7 +12,7 @@ source /usr/share/yunohost/helpers #================================================= ynh_script_progression "Stopping $app's systemd service..." -ynh_systemctl --service="$app" --action="stop" +ynh_systemctl --action="stop" #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE @@ -21,7 +21,7 @@ ynh_script_progression "Upgrading source files..." ynh_setup_source --dest_dir="$install_dir" -chown -R "$app:www-data" "$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/microbin" #================================================= @@ -31,8 +31,8 @@ ynh_script_progression "Updating $app's configuration files..." ynh_config_add --template=".env" --destination="$install_dir/.env" -chmod 400 "$install_dir/.env" -chown "$app:$app" "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chmod 400 "$install_dir/.env" +#REMOVEME? Assuming the file is setup using ynh_config_add, the proper chmod/chowns are now already applied and it shouldn't be necessary to tweak perms | chown "$app:$app" "$install_dir/.env" #================================================= # REAPPLY SYSTEM CONFIGURATIONS @@ -50,7 +50,7 @@ yunohost service add "$app" --description="Configurable file-sharing app" --log= #================================================= ynh_script_progression "Starting $app's systemd service..." -ynh_systemctl --service="$app" --action="start" +ynh_systemctl --action="start" #================================================= # END OF SCRIPT