#!/bin/bash source _common.sh source /usr/share/yunohost/helpers #================================================= # APP "BUILD" (DEPLOYING SOURCES, VENV, COMPILING ETC) #================================================= # DOWNLOAD, CHECK AND UNPACK SOURCE #================================================= ynh_script_progression "Setting up source files..." myynh_source_searxng ynh_script_progression "Installing SearXNG..." myynh_install_searxng #================================================= # SYSTEM CONFIGURATION #================================================= ynh_script_progression "Adding system configurations related to $app..." ynh_config_add_nginx ynh_add_uwsgi_service #================================================= # APP INITIAL CONFIGURATION #================================================= # ADD A CONFIGURATION #================================================= ynh_script_progression "Adding $app's configuration..." secret_key=$(ynh_string_random) ynh_config_add --template="settings.yml" --destination="$install_dir/settings.yml" myynh_set_permissions #================================================= # START SYSTEMD SERVICE #================================================= ynh_script_progression "Starting $app's systemd service..." ynh_systemctl --service="uwsgi-app@$app.service" --action="start" --wait_until="WSGI app 0 \(mountpoint='[/[:alnum:]_-]*'\) ready in [[:digit:]]* seconds on interpreter" --log_path="/var/log/uwsgi/$app/$app.log" #================================================= # END OF SCRIPT #================================================= ynh_script_progression "Installation of $app completed"