Created
December 9, 2016 19:05
-
-
Save haarts/85f0139355ebb45efea37533c3e98666 to your computer and use it in GitHub Desktop.
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
function verify_container_running --argument-names container | |
set container_status (curl -s -k --cert ~/.config/lxc/client.crt --key ~/.config/lxc/client.key https://localhost:8443/1.0/containers/$container | jq '.metadata.status') | |
if [ $container_status != "\"Running\"" ] | |
lxc start $container | |
end | |
end |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment