- Products
- Learn
- Local User Groups
- Partners
- More
Check Point Jump-Start Online Training
Now Available on CheckMates for Beginners!
Why do Hackers Love IoT Devices so Much?
Join our TechTalk on Aug 17, at 5PM CET | 11AM EST
Welcome to Maestro Masters!
Talk to Masters, Engage with Masters, Be a Maestro Master!
ZTNA Buyer’s Guide
Zero Trust essentials for your most valuable assets
The SMB Cyber Master
Boost your knowledge on Quantum Spark SMB gateways!
As YOU DESERVE THE BEST SECURITY
Upgrade to our latest GA Jumbo
CheckFlix!
All Videos In One Space
We are experiencing DNS resolution problems on our Firewall and currently engaging TAC. However, there is not a fix at this moment except I have to manually reboot the firewalls or stop and start the wsdnsd process every few hours.
I wonder if there is a way to schedule a job to run the following two commands (expert mode) every day, at 6:30AM.
cpwd_admin stop -name WSDNSD -path "$FWDIR/bin/wsdnsd" -command "kill -SIGTERM $(pidof $FWDIR/bin/wsdnsd)"
cpwd_admin start -name WSDNSD -path "$FWDIR/bin/wsdnsd" -command "wsdnsd"
Thanks
Sure. Pur them in a Bash script and source the CP environment, then run this script via Gaia‘a Job Scheduler at your prefered time.
I don't know how to script... Can you please give detail instructions?
Thanks
Ok, just put this script into a file named /home/admin/restart_wsdnsd
#!/bin/bash
source /etc/profile.d/CP.sh
if [[ -e /etc/profile.d/vsenv.sh ]]; then source /etc/profile.d/vsenv.sh fi
cpwd_admin stop -name WSDNSD -path "$FWDIR/bin/wsdnsd" -command "kill -SIGTERM $(pidof $FWDIR/bin/wsdnsd)"
cpwd_admin start -name WSDNSD -path "$FWDIR/bin/wsdnsd" -command "wsdnsd"
Make the file executable with this command:
chmod +x /home/admin/restart_wsdnsd
And finally run this script via Gaia‘a Job Scheduler at your prefered time.
./restart_wsdnsd
./restart_wsdnsd: line 7: syntax error: unexpected end of file
I tried to run it but it returned an error.
Thanks
I see the following result when the script runs, is that ok?
/home/admin/restart_wsdnsd: line 6: pidof: command not found
cpwd_admin:
Process WSDNSD (pid=22370) stopped with command "kill -SIGTERM ". Exit code 0.
cpwd_admin:
Process WSDNSD started successfully (pid=2701)
Thanks
About CheckMates
Learn Check Point
Advanced Learning
YOU DESERVE THE BEST SECURITY