node script with cron job that will keep a aws route53 dns A record up to date with the network's public IP when it is changed by an ISP
You can not select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
 
 

16 lines
316 B

#!/bin/bash
CONF=$1
if [ -z "$CONF" ];
then
echo missing configuration argument, aborting
exit 1
fi
DIR="$(dirname "$(readlink -f "$0")")"
# echo $DIR
cd $DIR || exit
NODE=$(which node)
export NODE_ENV=production
export NODE_APP_INSTANCE=$CONF
export NODE_ENV=$2
# echo $NODE
$NODE -r esm $DIR/index.js