#!/bin/bash
if [ -z "$(pgrep -f [s]cript)" ]
then {
echo $(date +%Y-%m-%d:%k:%M:%S) "Running script" >> /var/log/script_log
sleep 1 #delay
/usr/local/script.sh start
exit 1
} else {
echo $(date +%Y-%m-%d:%k:%M:%S) "EXIT. script already running!" >> /var/log/script_log
exit 1
}
fi