mirror of
https://github.com/YunoHost-Apps/searx_ynh.git
synced 2024-09-03 20:16:30 +02:00
commit
1466ec2bc3
8 changed files with 8 additions and 21 deletions
8
.github/workflows/updater.sh
vendored
8
.github/workflows/updater.sh
vendored
|
@ -20,13 +20,9 @@
|
||||||
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
current_version=$(cat manifest.json | jq -j '.version|split("~")[0]')
|
||||||
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
repo=$(cat manifest.json | jq -j '.upstream.code|split("https://github.com/")[1]')
|
||||||
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
# Some jq magic is needed, because the latest upstream release is not always the latest version (e.g. security patches for older versions)
|
||||||
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name' | sort -V | tail -1)
|
version=$(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '.[] | select( .prerelease != true ) | .tag_name | (if startswith("v") then .[1:] else . end)' | sort -V | tail -1)
|
||||||
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
assets=($(curl --silent "https://api.github.com/repos/$repo/releases" | jq -r '[ .[] | select(.tag_name=="'$version'").assets[].browser_download_url ] | join(" ") | @sh' | tr -d "'"))
|
||||||
|
|
||||||
# if [[ ${version:0:1} == "v" || ${version:0:1} == "V" ]]; then
|
|
||||||
# version=${version:1}
|
|
||||||
# fi
|
|
||||||
|
|
||||||
# Setting up the environment variables
|
# Setting up the environment variables
|
||||||
echo "Current version: $current_version"
|
echo "Current version: $current_version"
|
||||||
echo "Latest release from upstream: $version"
|
echo "Latest release from upstream: $version"
|
||||||
|
@ -63,7 +59,7 @@ echo "Handling asset at $asset_url"
|
||||||
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
|
# Here we base the source file name upon a unique keyword in the assets url (admin vs. update)
|
||||||
# Leave $src empty to ignore the asset
|
# Leave $src empty to ignore the asset
|
||||||
case $asset_url in
|
case $asset_url in
|
||||||
*".tar.gz"*)
|
*".tar.gz")
|
||||||
src="app"
|
src="app"
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
|
|
|
@ -17,7 +17,7 @@ If you don't have YunoHost, please consult [the guide](https://yunohost.org/#/in
|
||||||
|
|
||||||
Privacy-respecting, hackable metasearch engine
|
Privacy-respecting, hackable metasearch engine
|
||||||
|
|
||||||
**Shipped version:** 1.0.0~ynh4
|
**Shipped version:** 1.0.0~ynh5
|
||||||
|
|
||||||
**Demo:** https://demo.yunohost.org/searx/
|
**Demo:** https://demo.yunohost.org/searx/
|
||||||
|
|
||||||
|
|
|
@ -13,7 +13,7 @@ Si vous n'avez pas YunoHost, regardez [ici](https://yunohost.org/#/install) pour
|
||||||
|
|
||||||
Méta-moteur de recherche respectueux de la vie privée et bidouillable
|
Méta-moteur de recherche respectueux de la vie privée et bidouillable
|
||||||
|
|
||||||
**Version incluse :** 1.0.0~ynh4
|
**Version incluse :** 1.0.0~ynh5
|
||||||
|
|
||||||
**Démo :** https://demo.yunohost.org/searx/
|
**Démo :** https://demo.yunohost.org/searx/
|
||||||
|
|
||||||
|
|
|
@ -1,11 +1,6 @@
|
||||||
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
#sub_path_only rewrite ^__PATH__$ __PATH__/ permanent;
|
||||||
location __PATH__/ {
|
location __PATH__/ {
|
||||||
|
|
||||||
# Force usage of https
|
|
||||||
if ($scheme = http) {
|
|
||||||
rewrite ^ https://$server_name$request_uri? permanent;
|
|
||||||
}
|
|
||||||
|
|
||||||
uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__';
|
uwsgi_param SCRIPT_NAME '__PATH_NO_ROOT__';
|
||||||
include uwsgi_params;
|
include uwsgi_params;
|
||||||
uwsgi_modifier1 30;
|
uwsgi_modifier1 30;
|
||||||
|
|
|
@ -7,7 +7,7 @@
|
||||||
"fr": "Méta-moteur de recherche respectueux de la vie privée et bidouillable",
|
"fr": "Méta-moteur de recherche respectueux de la vie privée et bidouillable",
|
||||||
"de": "Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist"
|
"de": "Meta-Suchmaschine, die den Privatsphäre wahrt und 'hackable' ist"
|
||||||
},
|
},
|
||||||
"version": "1.0.0~ynh4",
|
"version": "1.0.0~ynh5",
|
||||||
"url": "https://searx.github.io/searx/",
|
"url": "https://searx.github.io/searx/",
|
||||||
"upstream": {
|
"upstream": {
|
||||||
"license": "AGPL-3.0-or-later",
|
"license": "AGPL-3.0-or-later",
|
||||||
|
@ -22,7 +22,7 @@
|
||||||
"email": "opi@zeropi.net"
|
"email": "opi@zeropi.net"
|
||||||
},
|
},
|
||||||
"requirements": {
|
"requirements": {
|
||||||
"yunohost": ">= 4.2.4"
|
"yunohost": ">= 4.3.0"
|
||||||
},
|
},
|
||||||
"multi_instance": false,
|
"multi_instance": false,
|
||||||
"services": [
|
"services": [
|
||||||
|
|
|
@ -101,7 +101,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --no-cache-dir
|
||||||
ynh_script_progression --message="Configuring Searx..." --weight=2
|
ynh_script_progression --message="Configuring Searx..." --weight=2
|
||||||
|
|
||||||
secret_key=$(ynh_string_random)
|
secret_key=$(ynh_string_random)
|
||||||
|
|
||||||
ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
|
ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
|
@ -34,8 +34,7 @@ final_path=$(ynh_app_setting_get --app=$app --key=final_path)
|
||||||
#=================================================
|
#=================================================
|
||||||
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
ynh_script_progression --message="Validating restoration parameters..." --weight=2
|
||||||
|
|
||||||
test ! -d $final_path \
|
test ! -d $final_path || ynh_die --message="There is already a directory: $final_path "
|
||||||
|| ynh_die --message="There is already a directory: $final_path "
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORE STEPS
|
# STANDARD RESTORE STEPS
|
||||||
|
|
|
@ -83,7 +83,7 @@ if [ "$upgrade_type" == "UPGRADE_APP" ]
|
||||||
then
|
then
|
||||||
ynh_script_progression --message="Upgrading source files..." --weight=3
|
ynh_script_progression --message="Upgrading source files..." --weight=3
|
||||||
|
|
||||||
# Create a temporary directory
|
# Create a temporary directory
|
||||||
tmpdir="$(mktemp -d)"
|
tmpdir="$(mktemp -d)"
|
||||||
|
|
||||||
# Backup the config file in the temp dir
|
# Backup the config file in the temp dir
|
||||||
|
@ -97,7 +97,6 @@ then
|
||||||
|
|
||||||
# Remove the tmp directory securely
|
# Remove the tmp directory securely
|
||||||
ynh_secure_remove --file="$tmpdir"
|
ynh_secure_remove --file="$tmpdir"
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -138,7 +137,6 @@ pip3 install --requirement $final_path/requirements-ynh.txt --upgrade
|
||||||
# ynh_script_progression --message="Configuring Searx..." --weight=2
|
# ynh_script_progression --message="Configuring Searx..." --weight=2
|
||||||
|
|
||||||
# secret_key=$(ynh_string_random)
|
# secret_key=$(ynh_string_random)
|
||||||
|
|
||||||
# ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
|
# ynh_add_config --template="../conf/settings.yml" --destination="$final_path/searx/settings.yml"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue