mirror of
https://github.com/opnsense/plugins.git
synced 2026-05-28 04:34:15 -04:00
rc.d: use absolute path for python3 in maltrailsensor + maltrailserver
service(8) invokes rc.d scripts with PATH=/sbin:/bin:/usr/sbin:/usr/bin
via `env -i`, which does not include /usr/local/bin where python3 lives.
daemon(8)'s execvp("python3") ENOENTs all four PATH entries and the
supervisor exits silently after the pre-detach parent has already
returned 0 to rc.subr. Net result: service start exits 0 with nothing
running, and boot-time autostart is broken when maltrailsensor_enable=YES.
Use absolute path /usr/local/bin/python3 to bypass the PATH lookup,
matching the convention used by other OPNsense plugin rc.d scripts
(stunnel, ddclient, tinc, openconnect).
Validated on OPNsense 26.4 / FreeBSD 14.3-RELEASE-p12 across
3 start/stop cycles + truss re-trace + full cold-start reboot.
This commit is contained in:
parent
cb9a5d6d69
commit
224dc76dd8
2 changed files with 2 additions and 2 deletions
|
|
@ -11,7 +11,7 @@ name=maltrailsensor
|
|||
rcvar=maltrailsensor_enable
|
||||
pidfile=/var/run/${name}.pid
|
||||
command=/usr/sbin/daemon
|
||||
command_args="-f -P /var/run/maltrailsensor.pid python3 /usr/local/share/maltrail/sensor.py"
|
||||
command_args="-f -P /var/run/maltrailsensor.pid /usr/local/bin/python3 /usr/local/share/maltrail/sensor.py"
|
||||
|
||||
load_rc_config opnsense-maltrailsensor
|
||||
|
||||
|
|
|
|||
|
|
@ -11,7 +11,7 @@ name=maltrailserver
|
|||
rcvar=maltrailserver_enable
|
||||
pidfile=/var/run/${name}.pid
|
||||
command=/usr/sbin/daemon
|
||||
command_args="-f -P /var/run/maltrailserver.pid python3 /usr/local/share/maltrail/server.py"
|
||||
command_args="-f -P /var/run/maltrailserver.pid /usr/local/bin/python3 /usr/local/share/maltrail/server.py"
|
||||
|
||||
load_rc_config opnsense-maltrailserver
|
||||
|
||||
|
|
|
|||
Loading…
Reference in a new issue