diff --git a/AWS/DDNS.bash b/AWS/DDNS.bash new file mode 100755 index 0000000..cbd4208 --- /dev/null +++ b/AWS/DDNS.bash @@ -0,0 +1,34 @@ +#!/bin/bash + +HOSTED_ZONE_ID="/hostedzone/Z00026583L98XLGPBWMM8" + +rm -f change-resource-record-sets.json +IFS='' read -r -d '' resource_update << EOS +{ + "Comment": "Update record to reflect new IP address for a system ", + "Changes": [ + { + "Action": "UPSERT", + "ResourceRecordSet": { + "Name": "gitlab.orion-technologies.io", + "Type": "A", + "TTL": 300, + "ResourceRecords": [ + { + "Value": "$(wget -qO- https://ipecho.net/plain ; echo)" + } + ] + } + } + ] +} +EOS + +echo \ +"Issuing command: + aws route53 change-resource-record-sets --hosted-zone-id ${HOSTED_ZONE_ID} --change-batch json-data-update(see script)" + +result="$(aws route53 change-resource-record-sets --hosted-zone-id "${HOSTED_ZONE_ID}" --change-batch "${resource_update}")" +echo \ +"Current Record Status: + $(jq '.ChangeInfo.Status' <(echo "${result}"))" diff --git a/CentOS/Minecraft/Minecraft-Start-Server.bash b/CentOS/Minecraft/Minecraft-Start-Server.bash index f3e920c..32b0371 100755 --- a/CentOS/Minecraft/Minecraft-Start-Server.bash +++ b/CentOS/Minecraft/Minecraft-Start-Server.bash @@ -302,8 +302,11 @@ if [[ "${rcon_ignore}" == 0 ]]; then [[ -z "${DEFAULT_RCON_PASSWORD}" ]] \ && log "warning" "No RCON password has been defined within $(basename "${0}"), consider generating one with \"openssl rand -base64 36\"" - sed -i "s/rcon.password=.+/rcon.password=${DEFAULT_RCON_PASSWORD}/g" server.properties \ + sed -i "s/rcon.password=.*/rcon.password=${DEFAULT_RCON_PASSWORD}/g" server.properties \ && log "info" "RCON password set" + + sed -i "s/enable-rcon=false/enable-rcon=true/g" server.properties \ + && log "info" "RCON Enabled" fi ## Accept the eula