ALERT: Datto Drive Cloud service is no longer available. For more information, see our end-of-life article. If you'd like to migrate your data to Datto Workplace, see our migration guide.

Datto Networking: scripts overview



If you have not done so already, see the scripts approval process article before following this article.


Fill the "" field (under Advanced) with the URL (domain + folder) which contains your "" script including the trailing slash. For example:

The firmware will download the "" file from that location each time the dashboard sends a full configuration reply to the device (mainly happens when the 'update network settings' button is pushed). Then its md5 checksum is compared with the previously executed file. If the md5 checksums mismatch (the has been altered) the is executed otherwise it is not, thus ensuring each device executes the file only once.

The file itself is deleted after the firmware ran it. Only the md5 checksum is stored in the uci config system. To verify whether or not your script ran you can retrieve the checksum with:

uci get node.setting.cs_md5

We save the downloaded file as under the /tmp directory and then execute it using /bin/sh -c /tmp/

Note that if you wish to run your script more than once (without altering it) you need to delete the stored md5 checksum and force a dashboard config reload by pushing the 'update network settings' button. Because downloading the script over and over is neither efficient nor feasible (you would have to keep pushing the button) it is recommended you install a permanent script onto the device and link it to one of the special purpose folders firmware-ng comes with:

  • /etc/cron.5mins/ - Every script in this folder will be executed every 5 minutes.
  • /etc/cron.hourly/ - Every script in this folder will be executed once per hour.
  • /etc/online.d/ - Every script beginning with a capital 'S' (as in 'start') followed by a number (e.g. 'S13') will be executed as soon an internet connection has been detected. If the script name begins with a 'K' (as in 'kill') followed by a number the script is executed when the internet connection is lost. The purpose of the number is to define the sequence in which the scripts are called.

To clear the md5 and re-run an existing script, use

Was this article helpful?

0 out of 0 found this helpful

You must sign in before voting on this article.

Want to talk about it? Have a feature request?

Head on over to our Community Forum or get live help.