#!/bin/bash

REPEATER_NUMBER=123456
REPEATER_ADDRESS=172.33.20.136
SERVER_ADDRESS=master.dstar.su
SERVER_PASSWORD=passw0rd
SERVICE_MODE=1

if [ -n "$1" ]
then
  # 1 - print to standard output
  # 2 - print to system log
  # 6 - run as daemon and print to system log
  SERVICE_MODE=$1
fi

./cronosagent \
  --trap-port 8162 \
  --repeater-number ${REPEATER_NUMBER} \
  --repeater-address ${REPEATER_ADDRESS} \
  --server-password ${SERVER_PASSWORD} \
  --server-address ${SERVER_ADDRESS} \
  --service-mode ${SERVICE_MODE}