#!/bin/sh

if [ "${1:-}" = "-x" ] ; then set -xv; shift; fi

if [ -z "${1-}" ] ; then check=`uname -n | cut -d. -f1`; else check=$1; fi

mylib=${check}disk.library_manager
mymed=${check}disk.media_changer

rcv_timeout=1
retries=10

echo -n "config "; python $ENSTORE_DIR/src/configuration_client.py   --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries
echo -n "log    "; python $ENSTORE_DIR/src/log_client.py             --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries
echo -n "inquisitor   "; python $ENSTORE_DIR/src/inquisitor_client.py      --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries
echo -n "volume "; python $ENSTORE_DIR/src/volume_clerk_client.py    --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries 
echo -n "file   "; python $ENSTORE_DIR/src/file_clerk_client.py      --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries 
echo -n "libman "; python $ENSTORE_DIR/src/library_manager_client.py --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries $mylib
echo -n "medch  "; python $ENSTORE_DIR/src/media_changer_client.py   --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --alive --alive_rcv_timeout=$rcv_timeout --alive_retries=$retries $mymed 0 0
echo -n "queue  "; python $ENSTORE_DIR/src/library_manager_client.py --config_host=$ENSTORE_CONFIG_HOST --config_port=$ENSTORE_CONFIG_PORT --getwork $mylib



