This file contains hidden or 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
#!/usr/bin/env bash | |
# Refactored by: Patrick Huber ([email protected]) | |
# Description: Digs the current external Ipv4 and compares it to a Ipv4 locally stored in a file. | |
# If the ips differ, aws cli is used to update a route 53 dns record with the new Ipv4. | |
# This script only supports Ipv4. | |
# Original script source: | |
# - https://willwarren.com/2014/07/03/roll-dynamic-dns-service-using-amazon-route53/ | |
# Dependencies: | |
# - awscli # install AWS cli: https://docs.aws.amazon.com/cli/latest/userguide/cli-chap-install.html |
This file contains hidden or 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 | |
IMAGE="registry.begasoft.ch/base_images_public/bgstoolbox:0" | |
COMMAND="/bin/sh" | |
SUFFIX=$(date +%s | shasum | base64 | fold -w 10 | head -1 | tr '[:upper:]' '[:lower:]') | |
AWSKEY="none" | |
AWSSEC="none" | |
usage_exit() { | |
echo "Usage: $0 [-c command] [-i image] [-a <AWSKEY>:<AWSSEC>]PVC ..." 1>&2 |