2
0
mirror of https://github.com/xcat2/confluent.git synced 2026-04-30 20:37:47 +00:00

Bring chrony fixes to other scripts

This commit is contained in:
Jarrod Johnson
2026-04-30 11:17:01 -04:00
parent 98cbd7581a
commit d10e49ed0d
2 changed files with 8 additions and 22 deletions

View File

@@ -21,17 +21,10 @@ if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
fi
if [ -f /tmp/timeservers ]; then
ntpsrvs=$(cat /tmp/timeservers)
sed -i "1,/^pool * /c\\
${ntpsrvs//$'\n'/\\$'\n'}" /etc/chrony.conf
systemctl restart chronyd
rm -f /tmp/timeservers
sed -i '/^[[:space:]]*\(pool\|server\)[[:space:]]/d' /etc/chrony.conf
cat /tmp/timeservers >> /etc/chrony.conf
systemctl restart chronyd
rm -f /tmp/timeservers
fi

View File

@@ -27,17 +27,10 @@ if grep ^ntpservers: /etc/confluent/confluent.deploycfg > /dev/null; then
fi
if [ -f /tmp/timeservers ]; then
ntpsrvs=$(cat /tmp/timeservers)
sed -i "1,/^pool * /c\\
${ntpsrvs//$'\n'/\\$'\n'}" /etc/chrony.conf
systemctl restart chronyd
rm -f /tmp/timeservers
sed -i '/^[[:space:]]*\(pool\|server\)[[:space:]]/d' /etc/chrony.conf
cat /tmp/timeservers >> /etc/chrony.conf
systemctl restart chronyd
rm -f /tmp/timeservers
fi