Caution! Article for developers

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

Update Hooks

Treon Gateway Treon Gateway 2 Treon Gateway in Protective Enclosure

Sometimes you might need to run some software after the Treon Gateway software update has been completed. Updatehooks are enabling to run scripts after the gateway update and persist_move

Definition

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

Creating Updatehooks

New updatehooks can be created to /etc/updatehooks.user.d/1. These programs can be e.g. bash or python scripts with shebang #!/bin/bash, #!/usr/bin/python3 or binary executables. Most important to them is 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, before the Treon Gateway has network access.


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