diff --git a/conf/app.src b/conf/app.src index 2460191..67dcc8a 100644 --- a/conf/app.src +++ b/conf/app.src @@ -1,5 +1,5 @@ -SOURCE_URL=https://github.com/YunoHost/yunorunner/archive/7ce0982ca5bdb94f5fc955ff1612ae82ced4f2d6.zip -SOURCE_SUM=697a7946aaf7d4f5925870a435cb7fbd +SOURCE_URL=https://github.com/YunoHost/yunorunner/archive/6aa293b3cd9b057ef9b8fd180a1d459ad2d45eab.zip +SOURCE_SUM=3b04e726d84184e934457dc9add35ac4 SOURCE_SUM_PRG=md5sum SOURCE_FORMAT=zip SOURCE_IN_SUBDIR=true diff --git a/conf/systemd.service b/conf/systemd.service index 047f0ea..cb5014f 100644 --- a/conf/systemd.service +++ b/conf/systemd.service @@ -4,10 +4,11 @@ After=network.target [Service] Type=simple +Restart=always User=__APP__ Group=__APP__ WorkingDirectory=__FINALPATH__ -ExecStart=__FINALPATH__/ve3/bin/python ./run.py /home/CI_package_check/analyseCI.sh +ExecStart=__FINALPATH__/ve3/bin/python ./run.py /home/CI_package_check/analyseCI.sh --port __PORT__ [Install] WantedBy=multi-user.target diff --git a/scripts/install b/scripts/install index a87b7d2..cd865c3 100644 --- a/scripts/install +++ b/scripts/install @@ -127,8 +127,9 @@ ynh_add_systemd_config # CHANGE PORT IN YUNORUNNER #================================================= -ynh_replace_string "localhost:4242" "localhost:$port" "$final_path/ciclic" -ynh_replace_string "port=4242" "port=$port" "$final_path/run.py" +ynh_replace_string "__PORT__" "$port" "/etc/systemd/system/$app.service" +ynh_store_file_checksum "/etc/systemd/system/$app.service" +systemctl daemon-reload #================================================= # GENERIC FINALISATION diff --git a/scripts/upgrade b/scripts/upgrade index 02285ed..b1574bb 100644 --- a/scripts/upgrade +++ b/scripts/upgrade @@ -102,11 +102,9 @@ ynh_add_systemd_config # CHANGE PORT IN YUNORUNNER #================================================= -if [ "$upgrade_type" == "UPGRADE_APP" ] -then - ynh_replace_string "localhost:4242" "localhost:$port" "$final_path/ciclic" - ynh_replace_string "port=4242" "port=$port" "$final_path/run.py" -fi +ynh_replace_string "__PORT__" "$port" "/etc/systemd/system/$app.service" +ynh_store_file_checksum "/etc/systemd/system/$app.service" +systemctl daemon-reload #================================================= # GENERIC FINALISATION