From 0ce8f3f2b2f35e7c5e60798eff44bba021b2e088 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 24 Apr 2023 16:28:20 +0200 Subject: [SSPS] Make (more) sure taskmanager is up before running bootup hook --- .../static_files/slxadmin/etc/systemd/system/slxadmin-boot.service | 2 +- .../static_files/slxadmin/opt/openslx/slxadmin-bootscript | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) (limited to 'satellit_installer') diff --git a/satellit_installer/static_files/slxadmin/etc/systemd/system/slxadmin-boot.service b/satellit_installer/static_files/slxadmin/etc/systemd/system/slxadmin-boot.service index 3322028..ede9d43 100644 --- a/satellit_installer/static_files/slxadmin/etc/systemd/system/slxadmin-boot.service +++ b/satellit_installer/static_files/slxadmin/etc/systemd/system/slxadmin-boot.service @@ -3,7 +3,7 @@ Description=Trigger init hooks of slx-admin RefuseManualStart=yes Before=lighttpd.service After=mariadb.service network-online.target taskmanager.service -Wants=network-online.target +Wants=network-online.target taskmanager.service [Service] Type=oneshot diff --git a/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript b/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript index 55afbe8..937de4f 100755 --- a/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript +++ b/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript @@ -2,6 +2,11 @@ /usr/local/sbin/slx-wait-online +# Even though we order this after taskmanager.service, it seems systemd +# still starts this up too soon, when maybe taskmanager doesn't have +# the port open yet. So let's go back to good old trial-and-error sleep +sleep 5 + FILE=$(mktemp) if ! php /srv/openslx/www/slx-admin/api.php init > "$FILE" 2>&1; then -- cgit v1.2.3-55-g7522