#!/bin/bash
status="OFF"
running=$(/usr/bin/pgrep -f scenari.Scenari)
if [ -f "/home/debian/CONFIG/scenari/STATUS" ]; then status=$(cat /home/debian/CONFIG/scenari/STATUS); fi
if [ ! -z "$running" ]; then status="OFF"; fi
if [ $status == "ON" ]; then (cd /home/debian/CONFIG/scenari/bin && /usr/local/jdk1.8.0_321/bin/java -classpath .:../org.eclipse.paho.client.mqttv3_1.2.5.jar:../org.json-1.0.0.v201011060100.jar:../bcprov-jdk13-167.jar:../bcpkix-jdk13-167.jar scenari.Scenari &>/dev/null&); fi
