#!/bin/bash source $(dirname $0)/conf-client/service.cfg source $(dirname $0)/conf-client/functions if [[ "$1" == "start" ]] then [[ -f /tmp/endmonitor ]] && rm -f /tmp/endmonitor rm /tmp/Monitor* /tmp/webmonithor &> /dev/null TotalConfig=$(ls -1 ./conf-client | grep Card_.*\.cfg|wc -l) for Conf in $(ls -1 ./conf-client | grep Card_.*\.cfg) do screen -dmS ${Conf} bash ./conf-client/exec.sh ${Conf} done screen -dmS webserver bash ./conf-client/webserver.sh ${WebPort} $TotalConfig fi if [[ "$1" == "stop" ]] then killall python &> /dev/null rm /tmp/Monithor* &> /dev/null touch /tmp/endmonitor fi