Using a DOS Batch Command File to Start/Stop Channels
For the example below you must have the GNU "wget" utility on your machine and in the path, in your current directory or its location specified in the script for the batch file examples to work correctly. Any equivalent programs to "wget" may be appropriately substituted. Wget is freely available for a variety of computers and operating systems.
Note that you are not restricted to using only this DOS batch command file. If desired, you can use your own scripts, or even scripts written in another scripting language.
To use the DOS batch command file, you must edit the following bat file output as necessary:
ECHO Off
SETLOCAL
IF "StartAll" == "%1" GOTO DOIT2
IF "StopAll" == "%1" GOTO DOIT2
IF "" == %2 GOTO DOERR
IF "Start" == "%1" GOTO DOIT
IF "Stop" == "%1" GOTO DOIT
:DOERR
echo"use is: Iguana_startstop [Start|Stop|StartAll|StopAll] [channel name] note capital S/A required in commands"
GOTO DONE
:DOIT
cd c:\temp
C:\iguanastats\wget -q "http://localhost:6543/status.html?UserName=admin&Password=password&ChannelAction=%1&ChannelName=%2"
GOTO DONE
:DOIT2
cd c:\temp
C:\iguanastats\wget -q "http://localhost:6543/status.html?UserName=admin&Password=password&ChannelAction=%1"
:DONE
ENDLOCAL
This code assumes that your Iguana server is running on port 6543. If you are using a different port, replace
6543 with this port.
Edit the hostname, port, user name and password as necessary in the above bat file.
Save the file as channels.bat in the same directory you extracted the wget utility.
Open a command prompt window, and go to the directory that you saved the bat file in (e.g. C:\iguanastats).
From the command prompt, type channels.bat (or whatever you named the file), followed by the parameter you want to use and the channel name (if applicable):
Choose the parameter you want to use (Start, Stop, StartAll or StopAll). You must use a capital S and/or A for commands.
When choosing a specific channel, edit the channel name as necessary. Note that you do not have to specify a channel name if you are using the StartAll or StopAll parameters.
Double-click the Dashboard link to refresh the web interface in Iguana, and confirm that your changes were made.