mirror of
https://github.com/YunoHost-Apps/searx_ynh.git
synced 2024-09-03 20:16:30 +02:00
Apply last example_ynh
This commit is contained in:
parent
38db4d43e2
commit
219485a162
11 changed files with 94 additions and 97 deletions
|
@ -17,11 +17,8 @@
|
||||||
upgrade=1 from_commit=1466ec2bc358ba4556c3b8d0725a914b3da69648
|
upgrade=1 from_commit=1466ec2bc358ba4556c3b8d0725a914b3da69648
|
||||||
backup_restore=1
|
backup_restore=1
|
||||||
multi_instance=0
|
multi_instance=0
|
||||||
|
port_already_use=0
|
||||||
change_url=1
|
change_url=1
|
||||||
;;; Options
|
;;; Options
|
||||||
Email=
|
Email=
|
||||||
Notification=none
|
Notification=none
|
||||||
;;; Upgrade options
|
|
||||||
; commit=24d48bd0e1268cae80a496855dbd9d404cd555ca
|
|
||||||
name=Merge pull request #84
|
|
||||||
manifest_arg=domain=DOMAIN&path=PATH&is_public=1&
|
|
||||||
|
|
|
@ -4,3 +4,4 @@ SOURCE_SUM_PRG=sha256sum
|
||||||
SOURCE_FORMAT=tar.gz
|
SOURCE_FORMAT=tar.gz
|
||||||
SOURCE_IN_SUBDIR=true
|
SOURCE_IN_SUBDIR=true
|
||||||
SOURCE_FILENAME=searx.tar.gz
|
SOURCE_FILENAME=searx.tar.gz
|
||||||
|
SOURCE_EXTRACT=true
|
||||||
|
|
1
doc/DESCRIPTION.md
Normal file
1
doc/DESCRIPTION.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
Privacy-respecting, hackable metasearch engine
|
1
doc/DISCLAIMER.md
Normal file
1
doc/DISCLAIMER.md
Normal file
|
@ -0,0 +1 @@
|
||||||
|
|
|
@ -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~ynh5",
|
"version": "1.0.0~ynh6",
|
||||||
"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",
|
||||||
|
|
|
@ -130,6 +130,17 @@ ynh_remove_uwsgi_service () {
|
||||||
ynh_secure_remove --file="/var/log/uwsgi/$app"
|
ynh_secure_remove --file="/var/log/uwsgi/$app"
|
||||||
ynh_secure_remove --file="/etc/systemd/system/uwsgi-app@$app.service.d"
|
ynh_secure_remove --file="/etc/systemd/system/uwsgi-app@$app.service.d"
|
||||||
fi
|
fi
|
||||||
|
if [ -e /etc/init.d/uwsgi ]
|
||||||
|
then
|
||||||
|
# Redémarre le service uwsgi si il n'est pas désinstallé.
|
||||||
|
ynh_systemd_action --service_name=uwsgi --action=start
|
||||||
|
else
|
||||||
|
if yunohost service status | grep -q uwsgi
|
||||||
|
then
|
||||||
|
ynh_print_info --message="Remove uwsgi service"
|
||||||
|
yunohost service remove uwsgi
|
||||||
|
fi
|
||||||
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
||||||
|
|
|
@ -138,6 +138,8 @@ ynh_script_progression --message="Configuring permissions..." --weight=2
|
||||||
# Make app public if necessary
|
# Make app public if necessary
|
||||||
if [ $is_public -eq 1 ]
|
if [ $is_public -eq 1 ]
|
||||||
then
|
then
|
||||||
|
# Everyone can access the app.
|
||||||
|
# The "main" permission is automatically created before the install script.
|
||||||
ynh_permission_update --permission="main" --add="visitors"
|
ynh_permission_update --permission="main" --add="visitors"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
|
|
@ -54,22 +54,6 @@ ynh_script_progression --message="Removing dependencies..." --weight=3
|
||||||
# Remove metapackage and its dependencies
|
# Remove metapackage and its dependencies
|
||||||
ynh_remove_app_dependencies
|
ynh_remove_app_dependencies
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# REMOVE SERVICE FROM ADMIN PANEL
|
|
||||||
#=================================================
|
|
||||||
|
|
||||||
if [ -e /etc/init.d/uwsgi ]
|
|
||||||
then
|
|
||||||
# Redémarre le service uwsgi si il n'est pas désinstallé.
|
|
||||||
ynh_systemd_action --service_name=uwsgi --action=start
|
|
||||||
else
|
|
||||||
if yunohost service status | grep -q uwsgi
|
|
||||||
then
|
|
||||||
ynh_print_info --message="Remove uwsgi service"
|
|
||||||
yunohost service remove uwsgi
|
|
||||||
fi
|
|
||||||
fi
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# GENERIC FINALIZATION
|
# GENERIC FINALIZATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -84,4 +68,4 @@ ynh_system_user_delete --username=$app
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Removal of Searx completed" --last
|
ynh_script_progression --message="Removal of $app completed" --last
|
||||||
|
|
|
@ -41,13 +41,6 @@ test ! -d $final_path \
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# STANDARD RESTORATION STEPS
|
# STANDARD RESTORATION STEPS
|
||||||
#=================================================
|
|
||||||
# RESTORE THE NGINX CONFIGURATION
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
|
||||||
|
|
||||||
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RECREATE THE DEDICATED USER
|
# RECREATE THE DEDICATED USER
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -77,6 +70,13 @@ ynh_script_progression --message="Reinstalling dependencies..." --weight=35
|
||||||
# Define and install dependencies
|
# Define and install dependencies
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# RESTORE THE NGINX CONFIGURATION
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Restoring the NGINX web server configuration..."
|
||||||
|
|
||||||
|
ynh_restore_file --origin_path="/etc/nginx/conf.d/$domain.d/$app.conf"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# RESTORE VARIOUS FILES
|
# RESTORE VARIOUS FILES
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -109,4 +109,4 @@ ynh_systemd_action --service_name=nginx --action=reload
|
||||||
# END OF SCRIPT
|
# END OF SCRIPT
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
||||||
ynh_script_progression --message="Restoration completed for Searx" --last
|
ynh_script_progression --message="Restoration completed for $app" --last
|
||||||
|
|
|
@ -98,6 +98,13 @@ then
|
||||||
ynh_secure_remove --file="$tmpdir"
|
ynh_secure_remove --file="$tmpdir"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
#=================================================
|
||||||
|
# UPGRADE DEPENDENCIES
|
||||||
|
#=================================================
|
||||||
|
ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
||||||
|
|
||||||
|
ynh_install_app_dependencies $pkg_dependencies
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# NGINX CONFIGURATION
|
# NGINX CONFIGURATION
|
||||||
#=================================================
|
#=================================================
|
||||||
|
@ -107,13 +114,6 @@ path_no_root=${path_url%/}
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config "path_no_root"
|
ynh_add_nginx_config "path_no_root"
|
||||||
|
|
||||||
#=================================================
|
|
||||||
# UPGRADE DEPENDENCIES
|
|
||||||
#=================================================
|
|
||||||
ynh_script_progression --message="Upgrading dependencies..." --weight=7
|
|
||||||
|
|
||||||
ynh_install_app_dependencies $pkg_dependencies
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC UPGRADE
|
# SPECIFIC UPGRADE
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue