mirror of
https://github.com/YunoHost-Apps/searxng_ynh.git
synced 2024-09-03 20:26:00 +02:00
New try to setup install script
This commit is contained in:
parent
770734acb6
commit
9131a3eeab
3 changed files with 1050 additions and 1614 deletions
1310
conf/settings.yml
1310
conf/settings.yml
File diff suppressed because it is too large
Load diff
|
@ -3,7 +3,9 @@
|
||||||
#=================================================
|
#=================================================
|
||||||
# COMMON VARIABLES
|
# COMMON VARIABLES
|
||||||
#=================================================
|
#=================================================
|
||||||
pkg_dependencies="python3-dev python3-babel python3-venv uwsgi uwsgi-plugin-python3 git build-essential libxslt-dev zlib1g-dev libffi-dev libssl-dev"
|
|
||||||
|
# dependencies used by the app
|
||||||
|
pkg_dependencies="git build-essential libxslt-dev python3-dev python3-venv python3-cffi python3-babel zlib1g-dev libffi-dev libssl-dev python3-lxml uwsgi uwsgi-plugin-python3 shellcheck"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# UWSGI HELPERS
|
# UWSGI HELPERS
|
||||||
|
@ -19,6 +21,7 @@ ynh_check_global_uwsgi_config () {
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=%i uWSGI app
|
Description=%i uWSGI app
|
||||||
After=syslog.target
|
After=syslog.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
RuntimeDirectory=%i
|
RuntimeDirectory=%i
|
||||||
ExecStart=/usr/bin/uwsgi \
|
ExecStart=/usr/bin/uwsgi \
|
||||||
|
@ -32,6 +35,7 @@ KillSignal=SIGQUIT
|
||||||
Type=notify
|
Type=notify
|
||||||
StandardError=syslog
|
StandardError=syslog
|
||||||
NotifyAccess=all
|
NotifyAccess=all
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
EOF
|
EOF
|
||||||
|
|
|
@ -127,7 +127,7 @@ ynh_script_progression --message="Configuring NGINX web server..." --weight=1
|
||||||
|
|
||||||
path_no_root=${path_url%/}
|
path_no_root=${path_url%/}
|
||||||
# Create a dedicated NGINX config
|
# Create a dedicated NGINX config
|
||||||
ynh_add_nginx_config
|
ynh_add_nginx_config "path_no_root"
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# SPECIFIC SETUP
|
# SPECIFIC SETUP
|
||||||
|
@ -147,6 +147,7 @@ pip3 install -e "$final_path"
|
||||||
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
ynh_script_progression --message="Adding a configuration file..." --weight=1
|
||||||
|
|
||||||
secret_key=$(ynh_string_random)
|
secret_key=$(ynh_string_random)
|
||||||
|
# TODO : secret_key ???
|
||||||
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"
|
||||||
|
|
||||||
# FIXME: this should be handled by the core in the future
|
# FIXME: this should be handled by the core in the future
|
||||||
|
@ -162,6 +163,11 @@ chown $app:$app "$final_path/searx/settings.yml"
|
||||||
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/some_config_file"
|
### ynh_replace_string --match_string="match_string" --replace_string="replace_string" --target_file="$final_path/some_config_file"
|
||||||
### ynh_store_file_checksum --file="$final_path/some_config_file"
|
### ynh_store_file_checksum --file="$final_path/some_config_file"
|
||||||
|
|
||||||
|
#### ADDED : SET PERMISSIONS ON SEARXNG DIRECTORY (CF SEARX SCRIPT)
|
||||||
|
|
||||||
|
chown -R $app: $final_path
|
||||||
|
|
||||||
|
|
||||||
#=================================================
|
#=================================================
|
||||||
# CONFIGURE UWSGI FOR SEARX
|
# CONFIGURE UWSGI FOR SEARX
|
||||||
#=================================================
|
#=================================================
|
||||||
|
|
Loading…
Add table
Reference in a new issue