Last active
May 1, 2019 22:12
-
-
Save ashlux/c6bdc65fdb138ed6036aa8ab8f638d28 to your computer and use it in GitHub Desktop.
Single line cloud foundry command to rolling restart all CF app instances. Works on OSX with Bash and ZSH. YMMV.
This file contains 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 | |
for app in $(cf apps | tail +5 | awk '{ print $1 }') ; do for i in `cf app ${app} | egrep '^#.*$' | awk '{ print $1 }' | sed s/\#//` ; do echo Restarting $app $i && cf restart-app-instance $app $i ; done ; done |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment