Caution! Article for developers

Information on this page is intended particularly for users with advanced technical knowledge.

Updatehooks

Jun 21, 2022 · 1 minutes to read

Treon Gateway

Sometimes you might need to run some software after firmware update has been completed. Updatehooks enable you to run script you want after gateway update and persist_move

What they are

Updatehooks are programs located in /etc/updatehooks.user.d/ and executed in first boot after firmware update. This means that they need to have their execute file permission and possibly shebang.

Creating

You can create new updatehooks to /etc/updatehooks.user.d/1. These programs can be e.g. bash or python scripts with shebang #!/bin/bash or #!/usr/bin/python3 or binary executables. The most important thing to remember is to have them with the executable flag e.g. Access: (0755/-rwxr-xr-x).

Please note: The updatehooks cannot access the internet as they are run by gw-system-persist at a very early stage of booting.


  1. /etc/updatehooks.user.d/ is persistent folder ↩︎


Was this article helpful? Let us know.
Next