Skip to content

Commit 7026957

Browse files
authored
check for systemd-timesyncd (hestiacp#4485)
* check for systemd-timesyncd
1 parent f5603eb commit 7026957

File tree

1 file changed

+8
-4
lines changed

1 file changed

+8
-4
lines changed

install/hst-install-debian.sh

Lines changed: 8 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -1214,10 +1214,14 @@ if [ -z "$(grep ^/usr/sbin/nologin /etc/shells)" ]; then
12141214
fi
12151215

12161216
# Configuring NTP
1217-
if [ ! -f "/etc/default/ntpsec-ntpdate " ]; then
1218-
sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
1219-
systemctl enable systemd-timesyncd
1220-
systemctl start systemd-timesyncd
1217+
if [ ! -f "/etc/default/ntpsec-ntpdate" ]; then
1218+
if [ -f /etc/systemd/timesyncd.conf ]; then
1219+
# Not installed by default in debian 12, consider add systemd-timesyncd to
1220+
# package list for install
1221+
sed -i 's/#NTP=/NTP=pool.ntp.org/' /etc/systemd/timesyncd.conf
1222+
systemctl enable systemd-timesyncd
1223+
systemctl start systemd-timesyncd
1224+
fi
12211225
fi
12221226
# Restrict access to /proc fs
12231227
# Prevent unpriv users from seeing each other running processes

0 commit comments

Comments
 (0)