From ca6b8281f3d952db5296b3116b1a8da234425380 Mon Sep 17 00:00:00 2001 From: Simon Rettberg Date: Mon, 23 Oct 2023 15:58:42 +0200 Subject: [SSPS] slxadmin-boot: Run as proper user, log to journal --- .../static_files/slxadmin/etc/systemd/system/slxadmin-boot.service | 1 + .../static_files/slxadmin/opt/openslx/slxadmin-bootscript | 2 ++ 2 files changed, 3 insertions(+) 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 ede9d43..34b0153 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 @@ -7,6 +7,7 @@ Wants=network-online.target taskmanager.service [Service] Type=oneshot +User=www-data ExecStart=/opt/openslx/slxadmin-bootscript [Install] diff --git a/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript b/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript index 937de4f..1df48a3 100755 --- a/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript +++ b/satellit_installer/static_files/slxadmin/opt/openslx/slxadmin-bootscript @@ -15,6 +15,8 @@ elif [ -s "$FILE" ]; then php /srv/openslx/www/slx-admin/api.php init --logreport "$FILE" fi +cat "$FILE" rm -- "$FILE" sleep 1 + exit 0 -- cgit v1.2.3-55-g7522