1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/searx_ynh.git synced 2024-09-03 20:16:30 +02:00
searx_ynh/scripts/backup

22 lines
614 B
Text
Raw Normal View History

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"