Skip to content

Instantly share code, notes, and snippets.

@basgys
Created December 15, 2011 17:47
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save basgys/1482038 to your computer and use it in GitHub Desktop.
Save basgys/1482038 to your computer and use it in GitHub Desktop.
Trigger call to all passenger instances
#!/bin/bash
if [ -z $1 ]; then
echo "Usage : "$0" http://passenger_address"
else
echo "address to call: "$1
passenger-status --verbose | grep 'Password:' | cut -d ':' -f2 | while read line; do
echo "Calling : "$line # Passenger instance password
curl --header "X-Passenger-Connect-Password: "$line $1 > /dev/null 2>&1
done
fi
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment