mirror of
https://blitiri.com.ar/repos/chasquid
synced 2025-12-17 14:37:02 +00:00
Add /exit endpoint to monitoring server
Allows terminating chasquid via the network. Useful to trigger a restart (if there is an init system to relaunch chasquid) and thus reload certificates. Amended-by: Alberto Bertogli <albertito@blitiri.com.ar> Added tests, and adjusted shutdown sequence.
This commit is contained in:
committed by
Alberto Bertogli
parent
e9c6775418
commit
bb1b921e3c
@@ -153,6 +153,15 @@ function wait_for_file() {
|
||||
done
|
||||
}
|
||||
|
||||
function wait_until() {
|
||||
while true; do
|
||||
if eval "$@"; then
|
||||
return 0
|
||||
fi
|
||||
sleep 0.05
|
||||
done
|
||||
}
|
||||
|
||||
# Generate certs for the given hostname.
|
||||
function generate_certs_for() {
|
||||
CONFDIR="${CONFDIR:-config}"
|
||||
|
||||
Reference in New Issue
Block a user