EA for NTP

jriv
New Contributor III

Hi!

Anyone have an EA that will pull what NTP server is set to?

Thanks!
John

2 ACCEPTED SOLUTIONS

donmontalvo
Esteemed Contributor III

Server list:

#!/bin/sh
echo "<result>$( /bin/cat /etc/ntp.conf )</result>"

State:

#!/bin/sh
echo "<result>$( /usr/sbin/systemsetup -getusingnetworktime | awk '{ print $3}' )</result>"
--
https://donmontalvo.com

View solution in original post

mm2270
Legendary Contributor III

There's actually a template EA right in the JSS for that. It's basically already there. You just need to enable it. It's basically the same as the 2nd version above from @donmontalvo

View solution in original post

3 REPLIES 3

donmontalvo
Esteemed Contributor III

Server list:

#!/bin/sh
echo "<result>$( /bin/cat /etc/ntp.conf )</result>"

State:

#!/bin/sh
echo "<result>$( /usr/sbin/systemsetup -getusingnetworktime | awk '{ print $3}' )</result>"
--
https://donmontalvo.com

mm2270
Legendary Contributor III

There's actually a template EA right in the JSS for that. It's basically already there. You just need to enable it. It's basically the same as the 2nd version above from @donmontalvo

jriv
New Contributor III

I see it now. Thank you!