The type "script_output" doesn't pass on the parameters at all, while the type "stream_output" produces errors like those:
configd.py 24357 - [meta sequenceId="1"] [ed0118b6-cc66-4999-8f9f-ba9f9d59ced2] reordering IPv6 on interface re1...
configd.py 24357 - [meta sequenceId="2"] [ed0118b6-cc66-4999-8f9f-ba9f9d59ced2] Script action failed with [Errno 9] Bad file descriptor at Traceback (most recent call last): File "/usr/local/opnsense/service/modules/actions/stream_output.py", line 70, in execute callback(key.fileobj, mask) ~~~~~~~~^^^^^^^^^^^^^^^^^^^ File "/usr/local/opnsense/service/modules/actions/stream_output.py", line 48, in stdout_reader connection.send(data) ~~~~~~~~~~~~~~~^^^^^^ OSError: [Errno 9] Bad file descriptor (bytes processed 34)
configd.py 24357 - [meta sequenceId="3"] message ed0118b6-cc66-4999-8f9f-ba9f9d59ced2 [ipv6reorder reload re1] returned Execute error
The action file is this:
[reload]
parameter:%s
message:reordering IPv6 on interface %s...
command:/root/priorizeprivacy.sh
type:script
description:Reorder IPv6 addresses to priorize the PEA
The type "script" is the only one that works properly, but none of the other two.
What am I doing wrong this time?
Use script.
Cron doesn't process output anyway and both script_output and stream_output produce output.
Cheers,
Franco