#!/bin/bash
#
# sccl_win_install_service
#
# Windows Service installieren und starten
###########################################
#
cd ${0%/*}
if [[ $PWD != */bin ]]
 then
  cd bin
fi
#
if [[ -f /etc/sccl/sccl.conf ]]
 then
  . /etc/sccl/sccl.conf
  #
  CYGPATH=`pwd -P`
  WINPATH=$(cygpath -d $CYGPATH)
  ./cygrunsrv -I Sccl -p "${P}/unix2webd" -P "$WINPATH\\cygrunsrv.exe" -a "$PAR" -c "$P" -d "Script Cluster" -f "Script Cluster for Windows" -y "tcpip"
  ./cygrunsrv -S Sccl
else
  echo "Cluster nicht konfiguriert."
fi
