Skip to content

Instantly share code, notes, and snippets.

@magicalyak
Created January 21, 2020 22:07
Show Gist options
  • Star 0 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save magicalyak/88682c55c9747a77c17ec97becb8bd65 to your computer and use it in GitHub Desktop.
Save magicalyak/88682c55c9747a77c17ec97becb8bd65 to your computer and use it in GitHub Desktop.
#!/bin/bash
if [ ! "$(docker ps -q -f name=controller-postgres)" ]; then
if [ "$(docker ps -aq -f status=exited -f name=controller-postgres)" ]; then
docker start controller-postgres
docker start controller-smtp
fi
fi
echo "Sleeping 20 seconds before reboot"
sleep 20
sudo reboot
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment