Creating the script files manually - Security Center 5.10

Security Center Installation and Upgrade Guide for NEC Cluster 5.10

Applies to
Security Center 5.10
Last updated
2021-03-05
Content type
Guides
Guides > Installation guides
Language
English (United States)
Product
Security Center
Version
5.10

You must create two scripts files before the NEC cluster can offer failover protection.

What you should know

The required script files are called Start.bat and Stop.bat. They can be found in the /Tools folder of your Security Center installation package, or downloaded from GTAP, at http://gtap.genetec.com.

Procedure

  1. To prepare your start.bat script, open Notepad and paste the following lines of code:
    rem ***************************************
    rem *              start.bat              *
    rem ***************************************
    
    IF "%CLP_EVENT%" == "START"    GOTO GEN_PROC
    IF "%CLP_EVENT%" == "FAILOVER" GOTO GEN_PROC
    IF "%CLP_EVENT%" == "RECOVER"  GOTO EXIT
    
    rem CLUSTERPRO Server is not started
    ARMBCAST /MSG "CLUSTERPRO Server is offline" /A
    GOTO EXIT
    
    rem ***************************************
    rem Normal Startup process
    rem ***************************************
    :GEN_PROC
    
    rem Check Disk
    IF "%CLP_DISK%" == "FAILURE" GOTO ERROR_DISK
    
    rem Start services
    armload MSSQL /s /a /r 3 /fov /WAIT 30 MSSQL$SQLEXPRESS
    armload GenetecServer /s /a /r 3 /fov GenetecServer
    armload GenetecWatchdog /s /a /r 3 /fov GenetecWatchdog
    GOTO EXIT
    
    rem ***************************************
    rem Irregular process
    rem ***************************************
    
    rem Process for disk errors
    :ERROR_DISK
    ARMBCAST /MSG "Failed to connect the switched disk partition" /A
    GOTO EXIT
    
    :EXIT
    
  2. Save the file in a temporary location like your Windows desktop with the name Start.bat.
  3. To prepare your Stop.bat script, open Notepad and paste the following lines of code:
    rem ***************************************
    rem *              stop.bat               *
    rem ***************************************
    
    IF "%CLP_EVENT%" == "START"    GOTO GEN_PROC
    IF "%CLP_EVENT%" == "FAILOVER" GOTO GEN_PROC
    
    rem CLUSTERPRO Server is not started
    ARMBCAST /MSG "CLUSTERPRO Server is offline" /A
    GOTO EXIT
    
    :GEN_PROC
    
    rem Check Disk
    IF "%CLP_DISK%" == "FAILURE" GOTO ERROR_DISK
    
    rem ** Stop the Genetech Services **
    armkill GenetecWatchdog
    armkill GenetecServer
    armkill MSSQL
    
    GOTO EXIT
    
    rem ***************************************
    rem Irregular process
    rem ***************************************
    
    rem Process for disk errors
    :ERROR_DISK
    ARMBCAST /MSG "Failed to connect the switched disk partition" /A
    
    :EXIT
    
  4. Save the file in a temporary location like your Windows desktop with the name Stop.bat.

After you finish

Keep the two script files aside for the moment. They will be applied to the cluster later.