Created
February 5, 2021 11:11
-
-
Save shesek/c8c9c7704ed2a48c76736abefce8ecc0 to your computer and use it in GitHub Desktop.
Display which services are in the process of shutting down (s6)
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
#!/bin/bash | |
sp='\|/-' | |
i=1 | |
cd /var/run/s6/services | |
while :; do | |
services=$(for s in *; do s6-svstat $s 2> /dev/null | grep -q 'want down' && echo $s || true; done) | |
[ -n "$services" ] || break | |
echo -ne "[s6-finish] waiting for: $services ${sp:i++%${#sp}:1} \r" | |
sleep 0.2 | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment