From e3d830d27ba3e4794669b09c22ba152b2a22f20b Mon Sep 17 00:00:00 2001 From: Yunohost-Bot <> Date: Sat, 31 Aug 2024 02:59:20 +0200 Subject: [PATCH] [autopatch] Automatic patch attempt for helpers 2.1 --- conf/nginx.conf | 2 +- manifest.toml | 4 +++- scripts/_common.sh | 49 +++++++++++++++++++----------------------- scripts/backup | 19 +++++------------ scripts/change_url | 28 ++++++++---------------- scripts/install | 40 +++++++++++++--------------------- scripts/remove | 14 ++++-------- scripts/restore | 31 +++++++++++---------------- scripts/upgrade | 53 +++++++++++++++++----------------------------- 9 files changed, 91 insertions(+), 149 deletions(-) diff --git a/conf/nginx.conf b/conf/nginx.conf index 2b9b3e9..165a961 100644 --- a/conf/nginx.conf +++ b/conf/nginx.conf @@ -4,7 +4,7 @@ location __PATH__/ { uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__'; include uwsgi_params; uwsgi_modifier1 30; - uwsgi_pass unix:///var/run/__NAME__/app.socket; + uwsgi_pass unix:///var/run/__APP__/app.socket; #location __PATH__/searx/static/ { # alias __INSTALL_DIR__/searx/static/; diff --git a/manifest.toml b/manifest.toml index 0a03901..86eb973 100644 --- a/manifest.toml +++ b/manifest.toml @@ -20,7 +20,8 @@ admindoc = "https://github.com/searx/searx/wiki" code = "https://github.com/searx/searx" [integration] -yunohost = ">= 11.2" +yunohost = ">= 11.2.18" +helpers_version = "2.1" architectures = "all" multi_instance = false @@ -57,6 +58,7 @@ ram.runtime = "50M" [resources.system_user] [resources.install_dir] + group = "www-data:r-x" [resources.permissions] main.url = "/" diff --git a/scripts/_common.sh b/scripts/_common.sh index 4fa380b..1721e98 100644 --- a/scripts/_common.sh +++ b/scripts/_common.sh @@ -1,20 +1,16 @@ #!/bin/bash #================================================= -# COMMON VARIABLES -#================================================= - -#================================================= -# PERSONAL HELPERS +# COMMON VARIABLES AND CUSTOM HELPERS #================================================= _searx_venv_install() { - ynh_exec_as "$app" python3 -m venv --upgrade "$install_dir/venv" + ynh_exec_as_app python3 -m venv --upgrade "$install_dir/venv" venvpy="$install_dir/venv/bin/python3" - ynh_exec_as "$app" "$venvpy" -m pip install --upgrade --no-cache-dir pip + ynh_exec_as_app "$venvpy" -m pip install --upgrade --no-cache-dir pip - ynh_exec_as "$app" "$venvpy" -m pip install setuptools wheel pyyaml + ynh_exec_as_app "$venvpy" -m pip install setuptools wheel pyyaml } #================================================= @@ -25,7 +21,7 @@ _searx_venv_install() { # # 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 <