- Products
- Learn
- Local User Groups
- Partners
- More
MVP 2026: Submissions
Are Now Open!
What's New in R82.10?
Watch NowOverlap in Security Validation
Help us to understand your needs better
CheckMates Go:
Maestro Madness
Hello,
I try to run a bash script as a schedules task (admin user) via Gaia on a R77.30 management server. The purpose of the script is to use the "fwm logexport" command to convert log files to ascii format and then move the file over scp to a Linux server.
Everything works as expected when calling the script on the command line via expert mode. When the script runs from the cron job everything works the same except that the fwm command cannot be found.
When I just use "fwm" as command in the script I get this error: "fwm: command not found"
When I try to specify the whole path "/opt/CPsuite-R77/fw1/bin/fwm" I get this error: "/opt/CPsuite-R77/fw1/bin/fwm: error while loading shared libraries: libcplic_cntrct.so: cannot open shared object file: No such file or directory"
Thanks in advanced,
Dominik
Do you have the following early on in your script to properly set the different Check Point environment variables including PATH:
source /opt/CPshrd-R77/tmp/.CPprofile.sh
or
source /opt/CPshrd-R77/tmp/.CPprofile.csh
--
Second Edition of my "Max Power" Firewall Book
Now Available at http://www.maxpowerfirewalls.com
Many thanks this solved my issue.
I recommend to add the line below on top of your script:
source /etc/profile.d/CP.sh;In case you also wish to create similar scripts on VSX systems, just add this line as well:
source /etc/profile.d/vsenv.sh;
At the top of my cronjobs that require Checkpoint Environment Variables I use:
#Load Checkpoint Environment Variables
source /etc/profile.d/CP.sh
if [[ -e /etc/profile.d/vsenv.sh ]]; then
source /etc/profile.d/vsenv.sh
fi
The outcome should be the same as what Tim provided.
Thanks Bryce - this helped me out finishing a script today and having issues with the same error Dominik had, but on R80.20.
Hi Guys
i've just updated VSX R80.30 to R80.40 but the script doesn't work into crontab
Here the script:
#!/bin/bash -f
#
#
source /etc/profile.d/vsenv.sh;
vsenv 4
cphaprob state | grep local | grep ACTIVE >> /dev/null
if [ $? -eq 0 ]; then
echo "--- Vpn user counter ---" > /tmp/userc_users
fw tab -t userc_users -s > /tmp/userc_users
source /etc/profile.d/vsenv.sh;
vsenv 0
# Leggo il file temporaneo e mando il contenuto via mail
cat /tmp/userc_users | $FWDIR/bin/sendmail -s 'Test' -t 10.79.226.17 -f xxxx@yyy.it wwww@yyy.it
else
exit
fi
If i launc manually works
thanks in advance
Try to replace:
#!/bin/bash -f
with:
#!/bin/bash
Leaderboard
Epsum factorial non deposit quid pro quo hic escorol.
| User | Count |
|---|---|
| 16 | |
| 15 | |
| 7 | |
| 5 | |
| 5 | |
| 5 | |
| 4 | |
| 4 | |
| 4 | |
| 4 |
Tue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsTue 16 Dec 2025 @ 05:00 PM (CET)
Under the Hood: CloudGuard Network Security for Oracle Cloud - Config and Autoscaling!Thu 18 Dec 2025 @ 10:00 AM (CET)
Cloud Architect Series - Building a Hybrid Mesh Security Strategy across cloudsAbout CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY