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 | |
publicIP=`dig +short myip.opendns.com @resolver1.opendns.com` | |
securityGroupIds="sg-stuffstuff" | |
ruleDescription="This is the string we're using to find our rule" | |
## Consult previous one | |
awsOutput=`aws ec2 describe-security-groups --group-ids $securityGroupIds` | |
ipRangeIndex=`echo $awsOutput | gron | grep $ruleDescription | sed "s/.\+IpRanges\[\([0-9]\+\)\].\+/\1/"` |
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 | |
# Run update-alternatives for a manual installed JDK | |
JAVA_HOME=/opt/java/jdk1.8.0_152 | |
java_bins=(appletviewer extcheck idlj jarsigner java javac javadoc javafxpackager javah javap javapackager java-rmi.cgi javaws jcmd jconsole jcontrol jdb jdeps jhat jinfo jjs jmap jps jrunscript jsadebugd jstat jstatd jvisualvm keytool native2ascii orbd pack200 policytool rmic rmid schemagen servertool tnameserv wsgen wsimport xjc jar jmc jmc.ini jstack rmiregistry serialver unpack200) | |
for java_bin in ${java_bins[@]}; do | |
echo "Setting $java_bin..." | |
update-alternatives --install /usr/bin/$java_bin $java_bin $JAVA_HOME/bin/$java_bin 1 |
OlderNewer