Shell script fails when running in cron
by roffeboffe from LinuxQuestions.org on (#5PV48)
Hi
This scripts works fine when ran from command line:
Quote:
As stated, this works perfectly when running from command line, but it doesn't work when putting it into this cron job:
Quote:
Any tips?
Running on an old rasperry pi. Purpose is to have an always on network monotoring screen at home, but our firewall drops the vpn connection after 24 hours.
This scripts works fine when ran from command line:
Quote:
#!/bin/sh export PASSWD=duhmmy-password killall -9 openconnect sleep 3 nohup echo $PASSWD | openconnect --protocol=gp --user rosc vpngateway.mycomp.com & |
Quote:
0 */12 * * * /root/vpn-up.sh |
Running on an old rasperry pi. Purpose is to have an always on network monotoring screen at home, but our firewall drops the vpn connection after 24 hours.