Created
June 4, 2024 19:45
-
-
Save iarp/0ee5c45902fb53890f2bd7373b170e42 to your computer and use it in GitHub Desktop.
Stop unraid's docker containers bottom up.
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
sed '1!G;h;$!d' "/boot/config/plugins/dockerMan/userprefs.cfg" | while read line || [[ -n $line ]]; | |
do | |
# do something with $line here | |
tmp=${line#*\"} # Remove everything up to and including first = | |
container_name=${tmp::-1} | |
echo "Stopping $container_name" | |
docker stop -t 30 $container_name | |
done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment