summaryrefslogtreecommitdiff
path: root/docs
diff options
context:
space:
mode:
authorfett0 <fernando.gmaidana@gmail.com>2021-06-17 14:02:39 -0300
committerfett0 <fernando.gmaidana@gmail.com>2021-06-17 14:02:39 -0300
commitf7fc3ce017b03f7c9f4a20a94e2a4d03ee935852 (patch)
treeac00fd39e658343b39e98ff20ed1ec053af2b120 /docs
parent5b5a84606f3eb415cfa0f270a8e6803b5b336ae1 (diff)
downloadvyos-documentation-f7fc3ce017b03f7c9f4a20a94e2a4d03ee935852.tar.gz
vyos-documentation-f7fc3ce017b03f7c9f4a20a94e2a4d03ee935852.zip
automation: add custom pre/post-commit hooks
Diffstat (limited to 'docs')
-rw-r--r--docs/automation/command-scripting.rst19
1 files changed, 19 insertions, 0 deletions
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
------------------