Run_Z-Agent.sh in cron
Posted: 18 Feb 2012 13:57
Hi
After some time I got the zwave.me usb stick and software working on my synology DS210j NAS.
When I log on to the NAS via putty terminal I can run the Run_Z-Agent.sh script and everything works fine.
I'm having trouble getting the script to run automatically either from startup (/etc/rc.local) or from /etc/crontab.
I'm not very knowledgeable in linux but I've found on google that cron uses a different environment and that if something goes wrong full paths should be added to commands. I've tried this but to no avail.
The result is that when booted up I have the following relevant processes:
/bin/sh /volume2/zwave/Run_Z-Agent.sh
/opt/bin/sleep 1 (which is in the Run_Z-Agent.sh loop)
When I start the script manually this process is included
/volume2/zwave/z-agent -s z-cloud.z-wave.me --cacert /volume2/Certificates/cacert.pem --cert /volume2/Certificates/cert.pem --key /volume2/Certificates/cert.key -d /dev/usb/ttyUSB0
And the sleep command is not a constant process.So it seems something is going wrong with calling z-agent in the loop.
Any help would be appreciated.
After some time I got the zwave.me usb stick and software working on my synology DS210j NAS.
When I log on to the NAS via putty terminal I can run the Run_Z-Agent.sh script and everything works fine.
I'm having trouble getting the script to run automatically either from startup (/etc/rc.local) or from /etc/crontab.
I'm not very knowledgeable in linux but I've found on google that cron uses a different environment and that if something goes wrong full paths should be added to commands. I've tried this but to no avail.
The result is that when booted up I have the following relevant processes:
/bin/sh /volume2/zwave/Run_Z-Agent.sh
/opt/bin/sleep 1 (which is in the Run_Z-Agent.sh loop)
When I start the script manually this process is included
/volume2/zwave/z-agent -s z-cloud.z-wave.me --cacert /volume2/Certificates/cacert.pem --cert /volume2/Certificates/cert.pem --key /volume2/Certificates/cert.key -d /dev/usb/ttyUSB0
And the sleep command is not a constant process.So it seems something is going wrong with calling z-agent in the loop.
Any help would be appreciated.