Replaced chronyd with systemd-timesyncd

This commit is contained in:
2025-08-01 17:39:15 +02:00
parent 372f665bdb
commit 7c00a7b560

View File

@@ -16,27 +16,27 @@ chmod 700 /home/sysadmin/.ssh
curl -so /home/sysadmin/.ssh/authorized_keys $REPO/raw/branch/master/post/ansible.pub
chown -R sysadmin:admins /home/sysadmin/.ssh
#echo -e "${GREEN}Disable root user SSH access...${NOCOL}"
#sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
#sed -i 's/PermitRootLogin without-password/PermitRootLogin no/' /etc/ssh/sshd_config
echo -e "${GREEN}Disable root user SSH access...${NOCOL}"
sed -i 's/PermitRootLogin yes/PermitRootLogin no/' /etc/ssh/sshd_config
sed -i 's/PermitRootLogin without-password/PermitRootLogin no/' /etc/ssh/sshd_config
echo -e "${GREEN}Configuring default firewall...${NOCOL}"
curl -so /etc/iptables/iptables.rules $REPO/raw/branch/master/post/iptables.rules
curl -so /etc/iptables/ip6tables.rules $REPO/raw/branch/master/post/ip6tables.rules
echo -e "${GREEN}Install minimal required packages...${NOCOL}"
pacman --noconfirm -S chrony cronie rsync iftop htop bash-completion iotop lsof screen fastfetch neovim man-db inetutils base-devel git networkmanager
pacman --noconfirm -S cronie rsync iftop htop bash-completion iotop lsof screen fastfetch neovim man-db inetutils base-devel git networkmanager
ln -s /usr/bin/nvim /usr/bin/vi
echo -e "${GREEN}Setup Chronyd service...${NOCOL}"
curl -so /etc/chrony.conf $REPO/raw/branch/master/post/chrony.conf
echo -e "${GREEN}Setup time service...${NOCOL}"
sed -i 's/#NTP=/NTP=ntp1.xoservice.nl/' /etc/systemd/timesyncd.conf
sed -i 's/#FallbackNTP=0.arch.pool.ntp.org 1.arch.pool.ntp.org 2.arch.pool.ntp.org 3.arch.pool.ntp.org/FallbackNTP=ntp2.xoservice.nl/' /etc/systemd/timesyncd.conf
echo -e "${GREEN}Activating required services...${NOCOL}"
systemctl enable iptables
systemctl enable ip6tables
systemctl enable NetworkManager
systemctl enable cronie
systemctl enable chronyd
echo -e "${GREEN}Setup motd default...${NOCOL}"
echo "" > /etc/motd