update-public-ip/run

17 lines
316 B
Plaintext
Raw Permalink Normal View History

#!/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