- CheckMates
- :
- Products
- :
- Quantum
- :
- Management
- :
- Job Scheduler to stop and start the wsdnsd process...
- Subscribe to RSS Feed
- Mark Topic as New
- Mark Topic as Read
- Float this Topic for Current User
- Bookmark
- Subscribe
- Mute
- Printer Friendly Page
Are you a member of CheckMates?
×- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
Job Scheduler to stop and start the wsdnsd process on Gaia R80.10
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
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
I don't know how to script... Can you please give detail instructions?
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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.
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
./restart_wsdnsd
./restart_wsdnsd: line 7: syntax error: unexpected end of file
I tried to run it but it returned an error.
Thanks
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
- Mark as New
- Bookmark
- Subscribe
- Mute
- Subscribe to RSS Feed
- Permalink
- Report Inappropriate Content
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
