Skip to main content
Solved

EA for NTP

  • August 16, 2017
  • 3 replies
  • 14 views

Forum|alt.badge.img+7

Hi!

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

Thanks!
John

Best answer by donmontalvo

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>"

3 replies

donmontalvo
Forum|alt.badge.img+36
  • Hall of Fame
  • Answer
  • August 16, 2017

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>"

mm2270
Forum|alt.badge.img+24
  • Legendary Contributor
  • August 16, 2017

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


Forum|alt.badge.img+7
  • Author
  • Contributor
  • August 16, 2017

I see it now. Thank you!