From 9ac38c79ca9a34561febeb723f7a1e5580512f87 Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 02:59:28 +0200 Subject: [PATCH] [autopatch] Automatic patch attempt for helpers 2.1 --- .gitignore | 1 + manifest.toml | 3 ++- scripts/_common.sh | 55 ++++++++++++++++++++++------------------------ scripts/backup | 17 ++++---------- scripts/change_url | 30 +++++++++---------------- scripts/install | 26 ++++++++-------------- scripts/remove | 17 +++++--------- scripts/restore | 24 +++++++------------- scripts/upgrade | 52 +++++++++++++++++++------------------------ 9 files changed, 88 insertions(+), 137 deletions(-) diff --git a/.gitignore b/.gitignore index 783a4ae..8f144f3 100644 --- a/.gitignore +++ b/.gitignore @@ -1,2 +1,3 @@ *~ *.sw[op] +.DS_Store diff --git a/manifest.toml b/manifest.toml index 2d75bf8..f2c05cf 100644 --- a/manifest.toml +++ b/manifest.toml @@ -18,7 +18,8 @@ userdoc = "https://docs.searxng.org/user/" code = "https://github.com/searxng/searxng" [integration] -yunohost = ">= 11.2.14" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = false ldap = "not_relevant" diff --git a/scripts/_common.sh b/scripts/_common.sh index e91855d..bfed19e 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,18 +1,14 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= # Install/Upgrade SearXNG in virtual environement myynh_source_searxng () { # Retrieve info from manifest - repo_fullpath=$(ynh_read_manifest --manifest_key="upstream.code") - commit_sha=$(ynh_read_manifest --manifest_key="resources.sources.main.url" | xargs basename --suffix=".tar.gz") + repo_fullpath=$(ynh_read_manifest + commit_sha=$(ynh_read_manifest | xargs basename --suffix=".tar.gz") # Download source sudo -H -u $app -i bash << EOF @@ -53,9 +49,9 @@ EOF # Set permissions myynh_set_permissions () { - chown -R $app: "$install_dir" - chmod 750 "$install_dir" - 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: "$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 750 "$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" } #================================================= @@ -66,7 +62,7 @@ myynh_set_permissions () { # # usage: ynh_check_global_uwsgi_config ynh_check_global_uwsgi_config () { - uwsgi --version || ynh_die --message="You need to add uwsgi (and appropriate plugin) as a dependency" + uwsgi --version || ynh_die "You need to add uwsgi (and appropriate plugin) as a dependency" cat > "/etc/systemd/system/uwsgi-app@.service" <