Running Check Point Commands in Shell Scripts

To run Check Point commands in your shell scripts, it is necessary to add the calls to the required Check Point shell scripts.

You must add these calls below the top line "#!/bin/bash".

On a Security Management Server / Log Server / SmartEvent Server

You must add the call to the /etc/profile.d/CP.sh script.

#!/bin/bash

source /etc/profile.d/CP.sh

<Applicable Check Point Commands>

[mandatory last new line]

On a Multi-Domain Server / Multi-Domain Log Server

You must add the calls to these scripts (in the order listed below):

  1. /etc/profile.d/CP.sh

  2. $MDSDIR/scripts/MDSprofile.sh

  3. $MDS_SYSTEM/shared/mds_environment_utils.sh

  4. $MDS_SYSTEM/shared/sh_utilities.sh

#!/bin/bash

source /etc/profile.d/CP.sh
source $MDSDIR/scripts/MDSprofile.sh
source $MDS_SYSTEM/shared/mds_environment_utils.sh
source $MDS_SYSTEM/shared/sh_utilities.sh

<Applicable Check Point Commands>

[mandatory last new line]

On a Security Gateway / Cluster Members (non-VSX)

You must add the call to the /etc/profile.d/CP.sh script.

#!/bin/bash

source /etc/profile.d/CP.sh

<Applicable Check Point Commands>

[mandatory last new line]

On a VSX Gateway / VSX Cluster Members

You must add the calls to these scripts (in the order listed below):

  1. /etc/profile.d/CP.sh

  2. /etc/profile.d/vsenv.sh

#!/bin/bash

source /etc/profile.d/CP.sh
source /etc/profile.d/vsenv.sh

<Applicable Check Point Commands>

[mandatory last new line]