Hell everyone.
I am running a raspberry pi 3B+. I have a a cronjob that runs a script (which seems to work fine) but when I look at the syslog I see errors, which you can find below.
I can't really figure out what is wrong, and I wonder if you guys do know. my mail (cat /var/mail/pi
) shows nothing.
I do run log2ram, if that makes any difference..
my crontab looks like this:
0 */4 * * * sh /home/pi/Projects/refresh-web-os.sh
The script it runs looks like this:
#!/bin/sh
sessionToken=$( ssh -i <<CREDENTIALS>> -o StrictHostKeyChecking=no -p <<PORT>> <<SSH_ADDRESS> cat /var/luna/preferences/devmode_enabled )
if [ -z "${sessionToken}" ]; then
echo "sessionToken is empty"
sessionToken=$(cat /tmp/webos_devmode_token_tv.txt)
else
echo "saving session token in temporary file (/tmp/webos_devmode_token_tv.txt)"
echo ${sessionToken} > /tmp/webos_devmode_token_tv.txt
fi
if [ -z "${sessionToken}" ]; then
echo "Unable to get token" >&2
exit 1
fi
checkSession=$(curl --max-time 3 -s "<<CURL_CALL>>")
echo $checkSession
and the syslog (grep cron /var/log/syslog -B 5 -A 5
) looks like this:
Feb 1 04:00:01 raspberrypi CRON[23440]: (pi) CMD (sh /home/pi/Projects/refresh-web-os.sh)
Feb 1 04:00:01 raspberrypi CRON[23441]: (root) CMD ( PATH="$PATH:/usr/sbin:/usr/local/bin/" pihole updatechecker local)
Feb 1 04:00:07 raspberrypi cron[413]: 2022-02-01 04:00:07 1nEjOp-00066P-0e Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Feb 1 04:00:07 raspberrypi cron[413]: 2022-02-01 04:00:07 1nEjOp-00066P-0e <= pi@raspberrypi U=pi P=local S=717
Feb 1 04:00:07 raspberrypi cron[413]: 2022-02-01 04:00:07 1nEjOp-00066P-0e Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Feb 1 04:00:07 raspberrypi cron[413]: exim: could not open panic log - aborting: see message(s) above
Feb 1 04:00:07 raspberrypi exim[23461]: 2022-02-01 04:00:07 1nEjOp-00066P-0e <= pi@raspberrypi U=pi P=local S=717
Feb 1 04:00:07 raspberrypi exim[23461]: 2022-02-01 04:00:07 1nEjOp-00066P-0e Cannot open main log file "/var/log/exim4/mainlog": Permission denied: euid=112 egid=119
Feb 1 04:00:07 raspberrypi exim[23461]: exim: could not open panic log - aborting: see message(s) above
Feb 1 04:00:07 raspberrypi CRON[23439]: (pi) MAIL (mailed 141 bytes of output but got status 0x0001 from MTA#012)