#!/bin/bash
APP=/home/erpsolution26/public_html/spincraft.erpsolution26.com
cd $APP || exit 0
if [ -f node.pid ] && kill -0 "$(cat node.pid)" 2>/dev/null; then exit 0; fi
export PATH=/opt/alt/alt-nodejs22/root/usr/bin:$PATH
export HOME=/home/erpsolution26
nohup ./node_modules/.bin/next start -p 3100 >> node.log 2>&1 &
echo $! > node.pid
