1
0
Fork 0
mirror of https://github.com/YunoHost-Apps/yunorunner_ynh.git synced 2024-09-03 20:36:13 +02:00

New configuration mecanism for yunorunner

This commit is contained in:
Alexandre Aubin 2021-03-01 21:47:04 +01:00
parent 7b3acfc9b2
commit 926553133a
4 changed files with 11 additions and 17 deletions

View file

@ -8,7 +8,7 @@ Restart=always
User=__APP__
Group=__APP__
WorkingDirectory=__FINALPATH__
ExecStart=__FINALPATH__/ve3/bin/python ./run.py /home/CI_package_check/analyseCI.sh --port __PORT__ --base-url https://__DOMAIN____PATH__
ExecStart=__FINALPATH__/ve3/bin/python ./run.py
[Install]
WantedBy=multi-user.target

View file

@ -0,0 +1,8 @@
BASE_URL = "https://__DOMAIN____PATH__"
PORT = __PORT__
DEBUG = False
PATH_TO_ANALYZER = "/home/CI_package_check/analyseCI.sh"
MONITOR_APPS_LIST = False
MONITOR_GIT = False
MONITOR_ONLY_GOOD_QUALITY_APPS = False
MONTHLY_JOBS = False

View file

@ -140,15 +140,10 @@ ynh_print_info "Configuring a systemd service..."
ynh_add_systemd_config
#=================================================
# CHANGE PORT IN YUNORUNNER
# CONFIGURE YUNORUNNER
#=================================================
ynh_replace_string "__DOMAIN__" "$domain" "/etc/systemd/system/$app.service"
ynh_replace_string "__PATH__" "$path_url" "/etc/systemd/system/$app.service"
ynh_replace_string "__PORT__" "$port" "/etc/systemd/system/$app.service"
# Calculate and store the config file checksum into the app settings
ynh_store_file_checksum "/etc/systemd/system/$app.service"
systemctl daemon-reload
ynh_add_config --template="yunorunner.config.py" --destination="$final_path/config.py"
#=================================================
# GENERIC FINALISATION

View file

@ -119,15 +119,6 @@ ynh_system_user_create $app
#=================================================
ynh_add_systemd_config
echo -e "\e[93m\e[1m[WARN]\e[0m Please have a look to the diff of your systemd conf file. The upgrade could have broken this CI." >&2
#=================================================
# CHANGE PORT IN YUNORUNNER
#=================================================
ynh_replace_string "__PORT__" "$port" "/etc/systemd/system/$app.service"
ynh_store_file_checksum "/etc/systemd/system/$app.service"
systemctl daemon-reload
#=================================================
# Fix current websocket version error (2019-02-14)