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 | |
# After a 1.7+ opsmanager restarts with a new ip address | |
# ssh into the opsmanager as 'ubuntu' and | |
# Run this file from the opsmanager as follows | |
# sudo su -l postgres < thisfile.sh > | |
# Get the current public ip or hostname from aws metadata | |
HN=$(curl http://169.254.169.254/latest/meta-data/public-hostname) |
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 | |
[ "$1" = "-d" ] && debug=on || debug=off | |
# Make working directory | |
export wrkdir=/tmp/wrkdir.$$ | |
mkdir -p ${wrkdir} | |
# Clean up function | |
clean_up() | |
{ |