From 78d62393263cc0f67f5784d2476452d1df19d26d Mon Sep 17 00:00:00 2001 From: Managor <42655600+Managor@users.noreply.github.com> Date: Sat, 21 Dec 2024 19:41:25 +0200 Subject: [PATCH] until: add page (#15233) * Create until.md * Update until.md * Update until.md * Update pages/common/until.md Co-authored-by: K.B.Dharun Krishna --------- Co-authored-by: K.B.Dharun Krishna --- pages/common/until.md | 12 ++++++++++++ 1 file changed, 12 insertions(+) create mode 100644 pages/common/until.md diff --git a/pages/common/until.md b/pages/common/until.md new file mode 100644 index 0000000000..a592815e98 --- /dev/null +++ b/pages/common/until.md @@ -0,0 +1,12 @@ +# until + +> Simple shell loop that repeats until it receives zero as return value. +> More information: . + +- Execute a command until it succeeds: + +`until {{command}}; do :; done` + +- Wait for a systemd service to be active: + +`until systemctl is-active --quiet {{nginx}}; do {{echo "Waiting..."}}; sleep 1; done; {{echo "Launched!"}}`