Merge branch '1page' of github.com:/finalsclubdev/FinalsClub
[oweals/finalsclub.git] / util / CloudWatch-1.0.12.1 / bin / mon-cmd.cmd
1 @echo off
2
3 setlocal
4
5 REM Set intermediate env vars because the %VAR:x=y% notation below
6 REM (which replaces the string x with the string y in VAR)
7 REM doesn't handle undefined environment variables. This way
8 REM we're always dealing with defined variables in those tests.
9 SET CHK_SERVICE_HOME=_%AWS_CLOUDWATCH_HOME%
10 SET SERVICE_HOME=%AWS_CLOUDWATCH_HOME%
11
12 if "%CHK_SERVICE_HOME:"=%" == "_" goto SERVICE_HOME_MISSING
13
14 SET SERVICE_HOME="%SERVICE_HOME:"=%"
15
16 :ARGV_LOOP
17 IF (%1) == () GOTO ARGV_DONE
18 REM Get around strange quoting bug
19 SET ARGV=%ARGV% %1
20 SHIFT
21 GOTO ARGV_LOOP
22 :ARGV_DONE
23
24 REM run
25 call %SERVICE_HOME%\bin\service.cmd %ARGV%
26 goto DONE
27
28 :SERVICE_HOME_MISSING
29 echo AWS_CLOUDWATCH_HOME is not set
30 exit /b 1
31
32 :DONE
33 endlocal
34
35 REM Restore original echo state
36 %ECHO_STATE%