#!/bin/bash status="OFF" running=$(/usr/bin/pgrep controller) if [ -f "/home/debian/CONFIG/controller/STATUS" ]; then status=$(cat /home/debian/CONFIG/controller/STATUS); fi if [ ! -z "$running" ]; then status="OFF"; fi if [ $status == "ON" ]; then (/home/debian/CONFIG/controller/bin/controller /home/debian/CONFIG/controller &>/dev/null&); fi