Hi Leon,
and thanks for the help! I was running my own non-root crontab. So I tried to
put the command in sudo crontab -e.
Stopped the service and tried it and now the service started as expected.
Great! And it worked with /etc/init.d/weewx start as startcommand.
I'm not sure I understood everything you wrote, I'm quite new at this, but you
made it clear what to try.
One more question, it seems that when I run it via sudo crontab there were some
issue with the logging,
hade to remove home/pliggen/scripts from the "logDir=" line.
Got this email message:
sh: 1: cannot create /home/pliggen/scripts//var/log/syslog.txt: Directory
nonexistent
Starting program...
Traceback (most recent call last):
File "/var/www/html/scripts/checkWeewx/checkWeewx.py", line 159, in <module>
sendMailFailure(logDir + "/" + logOutput, config, additionalText)
File "/var/www/html/scripts/checkWeewx/checkWeewx.py", line 86, in
sendMailFailure
f = file(filename)
IOError: [Errno 2] No such file or directory:
'/home/pliggen/scripts//var/log/syslog.txt'
So I removed the logDir file-path so it looks like this now:
[logging]
logDir=
logFile=checkWeewx.log
logOutput=/var/log/syslog.txt
linesToTail=200
logToTail=/var/log/messages
logRotationDayInterval=1
logDaysToKeep=5
And now I get this message in the email when the cronjob runs if the service is
stopped:
sh: echo: I/O error
sh: echo: I/O error
Starting program...
It doesn't matter as long as the service now seems to start but if you see
something obvious I'm glad to hear!
Thanks, and sorry for my bad english.
--
You received this message because you are subscribed to the Google Groups
"weewx-user" group.
To unsubscribe from this group and stop receiving emails from it, send an email
to [email protected].
For more options, visit https://groups.google.com/d/optout.