doz / start.sh
txtorg's picture
Create start.sh
fcce5fe verified
Raw
History Blame Contribute Delete
576 Bytes
#!/bin/bash
#####
#####
#####
set -e
#####
#####
#####
REPO_DIR="/app/axstream"
#####
#####
#####
REPO_URL="https://github.com/reaperofssa/axstream.git"
#####
#####
#####
if [ -d "$REPO_DIR/.git" ]; then
#####
#####
#####
echo "Repo exists, pulling latest changes..."
cd "$REPO_DIR"
#####
#####
#####
git reset --hard
#####
#####
#####
git pull
#####
#####
#####
else
#####
#####
#####
echo "Cloning public repo..."
git clone "$REPO_URL" "$REPO_DIR"
cd "$REPO_DIR"
#####
#####
#####
fi
#####
#####
#####
echo "Starting server..."
node server.js
#####
#####
#####