Skip to content

Conversation

jamtur01
Copy link

@jamtur01 jamtur01 commented Oct 13, 2025

Replace nocheck flag with proper PID file configuration to enable OPNsense service status monitoring. The service now correctly tracks the gateway process state via PID file.

Changes:

  • Remove 'nocheck' flag from service definition
  • Add dynamic PID file path reading from user configuration
  • Set default PID file location to /var/run/defguard_gateway.pid
  • Add default value to PidFile model field for consistency
  • Update form to display default PID file location hint
  • Simplify config.toml template to always output pidfile with default
  • Renamed the actions_defguardgateway.conf to actions_defguard_gateway.conf which now causes opnsense to correctly run the right action. Prior to this configd.py would return action defguardgateway.status not found for user root

The PID file location can now be customized by users through the UI, or will default to /var/run/defguard_gateway.pid. This ensures OPNsense can properly monitor and report the gateway service status.

@jamtur01
Copy link
Author

Not sure if this is useful to anyone but these are the changes I needed to make to allow OPNsense to properly manage the gateway service. YMMV.

Replace nocheck flag with proper PID file configuration to enable OPNsense
service status monitoring. The service now correctly tracks the gateway
process state via PID file.

Changes:
- Remove 'nocheck' flag from service definition
- Add dynamic PID file path reading from user configuration
- Set default PID file location to /var/run/defguard_gateway.pid
- Add default value to PidFile model field for consistency
- Update form to display default PID file location hint
- Simplify config.toml template to always output pidfile with default

The PID file location can now be customized by users through the UI, or
will default to /var/run/defguard_gateway.pid. This ensures OPNsense can
properly monitor and report the gateway service status.
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.

1 participant