Create a Post
cancel
Showing results for 
Search instead for 
Did you mean: 
Nick_Doropoulos
Advisor

Add sources inside bash scripts

To my understanding, the call for Check Point shell script (source /etc/profile.d/CP.sh) needs to be added at the very start of the script right after the sha-bang as per link below:

https://sc1.checkpoint.com/documents/R80.20_GA/WebAdminGuides/EN/CP_R80.20_CLI_ReferenceGuide/html_f...

I couldn't help but notice however that in several other scripts like the health check script that several sources are specified:

 

#====================================================================================================

#  Check Point Sources

#====================================================================================================

source /etc/profile.d/CP.sh 2> /dev/null

source /etc/profile.d/vsenv.sh 2> /dev/null

source $MDSDIR/scripts/MDSprofile.sh 2> /dev/null

source $MDS_SYSTEM/shared/sh_utilities.sh 2> /dev/null

source $MDS_SYSTEM/shared/mds_environment_utils.sh 2> /dev/null

 

As such, could somebody please explain to me if there are other calls we could use in our scripts apart from source /etc/profile.d/CP.sh?

Many thanks in advance.

0 Kudos
1 Reply
PhoneBoy
Admin
Admin

The other sources appear to include items relevant for MDS and VSX.
These environment variables are not relevant for every script.
That said, if you are doing something on a per domain or per VS in your script, including them is probably a good idea.
0 Kudos

Leaderboard

Epsum factorial non deposit quid pro quo hic escorol.

Upcoming Events

    Thu 07 May 2026 @ 01:30 PM (AEST)

    CheckMates Live Sydney

    Tue 02 Jun 2026 @ 09:00 AM (CEST)

    CheckMates Live Denmark - Aarhus

    Wed 03 Jun 2026 @ 09:00 AM (CEST)

    CheckMates Live Denmark - Copenhagen
    CheckMates Events