Skip to content

Create config_check.service - #7

Open
fzahir786 wants to merge 1 commit into
developfrom
topic/NOJIRA-1111
Open

Create config_check.service#7
fzahir786 wants to merge 1 commit into
developfrom
topic/NOJIRA-1111

Conversation

@fzahir786

Copy link
Copy Markdown
Owner

No description provided.

Copilot AI left a comment

Copy link
Copy Markdown

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

This pull request creates a new systemd service file config_check.service that runs after Wpeframework.service. The service appears to perform configuration checking and creates a runtime directory. However, the service file has several critical issues that violate the repository's systemd coding guidelines and would prevent the service from functioning correctly.

Changes:

  • Added config_check.service systemd unit file with basic service configuration

Comment on lines +1 to +8
[Unit]
After=Wpeframework.service

[Service]
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing [Install] section with WantedBy=multi-user.target. Without this section, the service won't start automatically at boot. Add an [Install] section with WantedBy=multi-user.target to ensure auto-start at boot for standalone services.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#9-boot-integration-requirement

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +1 to +2
[Unit]
After=Wpeframework.service

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing Description= field in the [Unit] section. A clear, descriptive Description= should explain what the service does to help others understand its purpose. Avoid generic descriptions or repeating the filename.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#1-add-proper-service-description

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +6 to +7
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

ExecStart and ExecStartPost directives must use absolute paths. Relative paths and bare commands are not allowed. Specify the full absolute path for 'config_check' and 'mkdir' to avoid reliance on environment variables like $PATH, which systemd does not inherit.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#2-provide-absolute-path-for-execution-directives

Copilot generated this review using guidance from repository custom instructions.
After=Wpeframework.service

[Service]
Type=simple

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Type=simple should be avoided. Prefer Type=notify for long-running services or Type=oneshot for one-time tasks. Type=simple doesn't guarantee service readiness and can cause race conditions where dependent services start before this service is truly operational. If this is a long-running daemon, use Type=notify with sd_notify() support. If this is a one-time task, use Type=oneshot.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#3-define-appropriate-service-type

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +5 to +8
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

RemainAfterExit=yes is only valid with Type=oneshot, not with Type=simple. This configuration is invalid and will cause systemd to reject the service. If the service creates persistent state (like the directory in ExecStartPost), use Type=oneshot with RemainAfterExit=yes. If it's a long-running daemon, use Type=notify or Type=simple without RemainAfterExit.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#4-service-state-managementremainafterexit

Copilot generated this review using guidance from repository custom instructions.
Comment on lines +4 to +8
[Service]
Type=simple
ExecStart=config_check --option
ExecStartPost=mkdir -p /var/run/config_checker
RemainAfterExit=yes

Copilot AI Feb 19, 2026

Copy link

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Missing TimeoutStartSec and TimeoutStopSec directives. Always specify both timeout values to prevent indefinite waits and ensure clear expectations. TimeoutStartSec should be 30 seconds or less, and TimeoutStopSec should be 10 seconds or less. If values greater than 90 seconds are needed, proper justification is required.

Refer: https://github.com/fzahir786/thunder-startup-services/blob/develop/.github/copilot-instructions.md#8-set-timeouts-and-limits-appropriately

Copilot generated this review using guidance from repository custom instructions.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants