1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/funkwhale_ynh.git synced 2024-09-03 18:36:24 +02:00
This commit is contained in:
Thomas 2023-06-19 20:42:36 +02:00 committed by GitHub
parent 01fcb048a1
commit fe39f28f24
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
6 changed files with 14 additions and 12 deletions

View file

@ -13,6 +13,7 @@ ExecStart=__INSTALL_DIR__/venv/bin/celery \
--app funkwhale_api.taskapp \
beat \
--loglevel INFO
--error-logfile /var/log/__APP__/__APP__-beat.log
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -15,6 +15,7 @@ ExecStart=__INSTALL_DIR__/venv/bin/celery \
worker \
--loglevel INFO \
--concurrency=${CELERYD_CONCURRENCY}
--error-logfile /var/log/__APP__/__APP__-worker.log
# Sandboxing options to harden security
# Depending on specificities of your service/app, you may need to tweak these

View file

@ -47,9 +47,9 @@ ynh_exec_warn_less ynh_exec_as $app $install_dir/venv/bin/funkwhale-manage fix_f
#=================================================
ynh_script_progression --message="Starting a systemd service..." --weight=1
ynh_systemd_action --service_name="$app-beat" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="$app-server" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="$app-worker" --action="start" --log_path="/var/log/$app/$app.log"
ynh_systemd_action --service_name="$app-beat" --action="start" --log_path="/var/log/$app/${app}-beat.log"
ynh_systemd_action --service_name="$app-server" --action="start" --log_path="/var/log/$app/${app}-server.log"
ynh_systemd_action --service_name="$app-worker" --action="start" --log_path="/var/log/$app/${app}-worker.log"
#=================================================
# END OF SCRIPT

View file

@ -76,9 +76,9 @@ ynh_script_progression --message="Configuring a systemd service..." --weight=1
ynh_add_config --template="../conf/funkwhale.target" --destination="/etc/systemd/system/$app.target"
# Create a dedicated systemd config
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service"
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service"
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service"
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service" --log="/var/log/__APP__/__APP__-server.log"
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service" --log="/var/log/__APP__/__APP__-worker.log"
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service" --log="/var/log/__APP__/__APP__-beat.log"
#=================================================
# INSTALL PYTHON DEPENDENCIES

View file

@ -79,9 +79,9 @@ systemctl enable "${app}-worker.service" --quiet
#=================================================
ynh_script_progression --message="Integrating service in YunoHost..." --weight=1
yunohost service add "${app}-beat"
yunohost service add "${app}-server"
yunohost service add "${app}-worker"
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service" --log="/var/log/__APP__/__APP__-server.log"
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service" --log="/var/log/__APP__/__APP__-worker.log"
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service" --log="/var/log/__APP__/__APP__-beat.log"
#=================================================
# START SYSTEMD SERVICE

View file

@ -132,9 +132,9 @@ ynh_script_progression --message="Upgrading systemd configuration..." --weight=1
ynh_add_config --template="../conf/funkwhale.target" --destination="/etc/systemd/system/$app.target"
# Create a dedicated systemd config
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service"
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service"
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service"
ynh_add_systemd_config --service="${app}-server" --template="funkwhale-server.service" --log="/var/log/__APP__/__APP__-server.log"
ynh_add_systemd_config --service="${app}-worker" --template="funkwhale-worker.service" --log="/var/log/__APP__/__APP__-worker.log"
ynh_add_systemd_config --service="${app}-beat" --template="funkwhale-beat.service" --log="/var/log/__APP__/__APP__-beat.log"
#=================================================
# GENERIC FINALIZATION