#!/bin/bash

BASEDIR=$(dirname -- "$(readlink -f -- "${BASH_SOURCE}")")

mkdir -p $BASEDIR/logs
log_file=$(date "+%Y_%m_%d-%H_%M_%S")

echo '[*] Realtime has been deployed.'
cd $BASEDIR && npm start 2>&1 | tee logs/$log_file.log

#!/bin/bash

HOMEDIR="/home/$usr"
BASEDIR=$(dirname -- "$(readlink -f -- "${BASH_SOURCE}")")
RUPTUREDIR="$HOMEDIR/.rupture"

if [ -d $RUPTUREDIR ]; then
    REALTIMEDIR="$RUPTUREDIR/realtime"
else
    REALTIMEDIR=$BASEDIR
fi

mkdir -p $REALTIMEDIR/logs
log_file=$(date "+%Y_%m_%d-%H_%M_%S")

echo '[*] Realtime has been deployed.'
cd $REALTIMEDIR && npm start 2>&1 | tee logs/$log_file.log

Add ~/.rupture check in realtime deploy
Add ~/.rupture check in realtime deploy
