Crontab not succeed

HI,i am use openwrt/strongswan (pppoe) connect to company .(site to site)

I am make a task that let the strongswan start a connect 30 min/per .

~# ps | grep cron
 5103 root      1192 S    /usr/sbin/crond -f -c /etc/crontabs -l 8
24042 root      1188 S    grep cron

~# ipsec status
Security Associations (0 up, 0 connecting):

~# crontab -l
*/30 * * * * /root/

~# cat
       ipsec status|grep -e none
       if [ "$?" == "0" ]
        ipsec up a

if manual execution #./ it is no problem

where is the problem?or are you have a good idea to do that?

thanks a lot .

Try using the full path to ipsec and grep in the script, and add #!/bin/sh as the first line.

1 Like

This topic was automatically closed 10 days after the last reply. New replies are no longer allowed.