sentinel-nikola not running properly in TOS 5.1
The cronjob that triggers sentinel-nikola in TOS 5.1 logs errors like this to /var/log/messages
Aug 28 04:15:01 turris crond[28884]: (root) CMD (/bin/sh -c "source /lib/functions/sentinel.sh; allowed_to_run "nikola" && exec sentinel-nikola --random-sleep")
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (/bin/sh: config_load: not found)
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (/bin/sh: config_get: not found)
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (sh: out of range)
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (/bin/sh: config_load: not found)
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (/bin/sh: config_get_bool: not found)
Aug 28 04:15:01 turris crond[28882]: (root) CMDOUT (Sentinel nikola not enabled)
Aug 28 04:15:01 turris crond[28880]: (root) CMDOUT (There is no message to send.)
Issue is that /lib/functions/sentinel.sh
is missing the line
. /lib/functions.sh
so functions like config_load
and config_get
can't work in the script. adding that line fixes it.
Edited by Vojtech Myslivec