Please read Script Templates section in Lighthouse manual https://ftp.opengear.com/download/documentation/manual/current/lighthouse/ and the following article as it explains Script Templates usage, how to upload and apply to specific nodes.
https://opengear.zendesk.com/hc/en-us/articles/115004747366-Configuration-Templating-on-Lighthouse-5
Note: Use the freely available Notepad++ which allows you to save the script with Unix (LF) line endings, not DOS (CRLF) line endings. Ensure any 'single' and "double" quotation marks have not been converted into curly “smart quotes”. Applying scripts with DOS (CRLF) line endings will break node configuration.
To disable NTP:
config -d config.ntp.enabled -a
To enable NTP:
Enable NTP via the GUI on a Node (Console Server).
SSH into the Node and run the following command to generate the configuration.
echo "config \\" ; config -g config.ntp | sed -e 's/ /=\'\''/' -e 's/$/'\'' \\/' -e 's/^/-s /'; echo "-a"
This example configures single NTP server:
config \
-s config.ntp.enabled='on' \
-s config.ntp.servers.server1.address='au.pool.ntp.org' \
-s config.ntp.servers.server1.key_id='0' \
-s config.ntp.servers.total='1' \
-a
It's useful to set the local Time Zone. Run the command below.
echo "config \\" ; config -g config.system.timezone | sed -e 's/ /=\'\''/' -e 's/$/'\'' \\/' -e 's/^/-s /'; echo "-a"
This example configures local time zone. The list of local time zone is available on the node in the file /usr/share/tzlist
config \
-s config.system.timezone='Australia/Brisbane' \
-a
The local time zone configuration can be used in a separate file or merged with the NTP configuration into a single script.
config \
-s config.ntp.enabled='on' \
-s config.ntp.servers.server1.address='au.pool.ntp.org' \
-s config.ntp.servers.server1.key_id='0' \
-s config.ntp.servers.total='1' \
-s config.system.timezone='Australia/Brisbane' \
-a
The commands can be copied and pasted directly on the Console Server CLI or saved in a file (attached) and deployed via Lighthouse Script Template.
Comments
0 comments
Article is closed for comments.