2016-05-07 18:21:06 +02:00
|
|
|
#!/bin/bash
|
2016-07-04 21:16:34 +02:00
|
|
|
app="searx"
|
2016-05-07 18:21:06 +02:00
|
|
|
|
|
|
|
# causes the shell to exit if any subcommand or pipeline returns a non-zero status
|
|
|
|
set -e
|
|
|
|
|
|
|
|
# Source YNH helpers
|
|
|
|
. /usr/share/yunohost/helpers
|
|
|
|
|
|
|
|
# Retrieve arguments
|
2016-07-04 21:16:34 +02:00
|
|
|
domain=$(ynh_app_setting_get "$app" domain)
|
|
|
|
path=$(ynh_app_setting_get "$app" path)
|
|
|
|
is_public=$(ynh_app_setting_get "$app" is_public)
|
2016-05-07 18:21:06 +02:00
|
|
|
|
|
|
|
# Backup sources & data
|
|
|
|
ynh_backup "/opt/yunohost/$app" "sources"
|
|
|
|
|
|
|
|
# Copy Nginx conf
|
|
|
|
ynh_backup "/etc/uwsgi/apps-available/$app.ini" "conf/searx.ini"
|
|
|
|
ynh_backup "/opt/yunohost/$app/searx/settings.yml" "conf/settings.yml"
|
|
|
|
ynh_backup "/etc/nginx/conf.d/$domain.d/$app.conf" "conf/nginx.conf"
|