#!/bin/bash

echo "================================================================================"
echo "START PULT.ONLINE SERVICES"

if [[ "$1" == "-h" ]] || [[ "$1" == "--help" ]] || [[ "$1" == "?" ]]; then
  echo "Usage: ./start [<service1[,<service2>...]> | -<service1[,<service2>...]>]"
  echo "Exmpl: ./start                     - starts all services"
  echo "       ./start gateway,modbusrtu   - starts only gateway and modbusrtu"
  echo "       ./start -modbusrtu          - starts all except modbusrtu"
else
  (./services/supervisor/pult_supervisor >/dev/null 2>&1 )&
  ./services/rpcconsole/pult_rpcconsole start "$@"
fi
echo "================================================================================"
