From f7fc3ce017b03f7c9f4a20a94e2a4d03ee935852 Mon Sep 17 00:00:00 2001 From: fett0 Date: Thu, 17 Jun 2021 14:02:39 -0300 Subject: automation: add custom pre/post-commit hooks --- docs/automation/command-scripting.rst | 19 +++++++++++++++++++ 1 file changed, 19 insertions(+) diff --git a/docs/automation/command-scripting.rst b/docs/automation/command-scripting.rst index 6bc6690c..b48b8dbf 100644 --- a/docs/automation/command-scripting.rst +++ b/docs/automation/command-scripting.rst @@ -105,6 +105,25 @@ group, the script can be safeguarded like this: exec sg vyattacfg -c "/bin/vbash $(readlink -f $0) $@" fi +Executing pre-hooks/post-hooks Scripts +------------------------------- + +Vyos has the ability to run custom scripts before and after each commit + +≈ + +The default folder where you put your custom Scripts is: + +.. code-block:: none + + +/config/scripts/commit/pre-hooks.d - folder with scripts that run before each commit +/config/scripts/commit/post-hooks.d - folder with scripts that run after each commit + +Scripts are run in alphabetical order. Their names must consist entirely of ASCII upper- and lower-case letters, ASCII digits, ASCII underscores, and ASCII minus-hyphens. +No other characters are allowed. + + Postconfig on boot ------------------ -- cgit v1.2.3