Created
May 16, 2019 01:51
-
-
Save rosdyana/2870804e4f66c0b1a772cdd1e78cdb63 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
#!/bin/bash | |
if [ "$(whoami)" != "root" ]; then | |
echo "Sorry, you are not root." | |
exit 1 | |
fi | |
echo "Stop all dokku--- Begin -->" | |
sudo dokku ps:stopall | |
echo "Stop all dokku--- End --/>" | |
sleep 3; | |
echo "Restart Docker --- Begin -->" | |
systemctl restart docker.service | |
echo "Restart Docker --- End --/>" | |
sleep 3; | |
echo "Start all dokku--- Begin -->" | |
sudo dokku ps:startall | |
echo "Start all dokku--- End --/>" | |
sleep 3; | |
echo "Cleanup dokku--- Begin -->" | |
sudo dokku cleanup | |
echo "Cleanup dokku--- End --/>" |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment