update-public-ip/run
David Kebler ba0f05436c added in systemd unit and scripts
added in APP_INSTANCE for custom start includine debug
first basic working version that has been deployed
2020-10-13 08:30:34 -07:00

16 lines
316 B
Bash
Executable file

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