#!/bin/bash botsdir="/home/lvrpg/samp02/Bots" phpexec="/usr/bin/php" file="lvrpgbots.php" check=`ps auxw | grep php | grep -v grep | grep $file | awk '{print $11}'` if [ -z "$check" ]; then echo -n "Echobot not loaded. Attempting to load... " cd "$botsdir" nohup $phpexec -f $file >> $botsdir/bots.log & echo "[DONE]" fi