#!/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 bash ./conf-client/webserver.sh ${WebPort} & export 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 -x ./conf-client/exec.sh ${Conf} done fi if [[ "$1" == "stop" ]] then killall python rm /tmp/Monithor* touch /tmp/endmonitor fi