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