From a846fe45d7a91a4c63e6fc7efe9db05fb530c463 Mon Sep 17 00:00:00 2001 From: ehsan shariati Date: Sun, 20 Oct 2024 19:55:05 -0400 Subject: [PATCH] Update customize-image.sh --- userpatches/customize-image.sh | 27 +++++++++++++++------------ 1 file changed, 15 insertions(+), 12 deletions(-) diff --git a/userpatches/customize-image.sh b/userpatches/customize-image.sh index c5601e8..877ef59 100644 --- a/userpatches/customize-image.sh +++ b/userpatches/customize-image.sh @@ -89,18 +89,21 @@ fxBloxCustomScriptService() touch /etc/systemd/system/fxBlox_custom_script_service.service cat > /etc/systemd/system/fxBlox_custom_script_service.service <<- EOF - [Unit] - Description=fxBlox_custom_script_service service - After=multi-user.target - - [Service] - User=root - Group=root - ExecStart=/bin/bash /usr/bin/fxBlox_custom_script_service.sh - Type=simple - - [Install] - WantedBy=multi-user.target +[Unit] +Description=fxBlox custom script service +After=multi-user.target network.target +ConditionPathExists=/root/.fxBlox_custom_script_service + +[Service] +Type=oneshot +User=root +Group=root +ExecStart=/bin/bash /usr/bin/fxBlox_custom_script_service.sh +RemainAfterExit=yes +TimeoutStartSec=infinity + +[Install] +WantedBy=multi-user.target EOF systemctl --no-reload enable fxBlox_custom_script_service.service