Netgate Discussion Forum
    • Categories
    • Recent
    • Tags
    • Popular
    • Users
    • Search
    • Register
    • Login

    [cron] pingtest script works from the shell, but not when called via cron

    pfSense Packages
    2
    3
    1.5k
    Loading More Posts
    • Oldest to Newest
    • Newest to Oldest
    • Most Votes
    Reply
    • Reply as topic
    Log in to reply
    This topic has been deleted. Only users with topic management privileges can see it.
    • A
      Abnovitas
      last edited by

      Hello!

      I wanted to use the pingtest script BennTech created and published in this thread and I ran into some strange issues.
      When I execute the script from a shell by hand it's working fine and the logfile shows "Ping 8.8.4.4 OK." but when I'm using cron to call the script, all pings fail instantly and it executes the interface reset and restarts the router afterwards.

      I didn't modify the script except for the user variables $ALLDEST and $BOUNCE and set up cron like it says in the topic:

      */5 * * * * root /usr/local/bin/pingtest.sh
      

      Thanks for any advise!

      1 Reply Last reply Reply Quote 0
      • marcellocM
        marcelloc
        last edited by

        Try to Edit your script and include full path to all binaries your script call

        Treinamentos de Elite: http://sys-squad.com

        Help a community developer! ;D

        1 Reply Last reply Reply Quote 0
        • A
          Abnovitas
          last edited by

          Thank you very much! That was the problem indeed :)

          Thanks!

          1 Reply Last reply Reply Quote 0
          • First post
            Last post
          Copyright 2025 Rubicon Communications LLC (Netgate). All rights reserved.