From 1ca25741db7bec2e1cbb5468f09ab758c30f87bc Mon Sep 17 00:00:00 2001 From: Molly Lau Date: Tue, 14 Nov 2023 03:21:41 +0900 Subject: [PATCH] Update ipv4_static_ipv6_static_interfaces.cfg --- .../Ubuntu/CloudInit/ipv4_static_ipv6_static_interfaces.cfg | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_ipv6_static_interfaces.cfg b/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_ipv6_static_interfaces.cfg index adb1015..0992822 100644 --- a/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_ipv6_static_interfaces.cfg +++ b/Linux_reinstall/Ubuntu/CloudInit/ipv4_static_ipv6_static_interfaces.cfg @@ -65,7 +65,6 @@ runcmd: - systemctl daemon-reload - update-rc.d ssh enable - kill -9 $(ps -ef | grep '/usr/sbin/sshd' | gawk '$0 !~/grep/ {print $2}' | tr -s '\n' ' ') - - systemctl restart sshd - ufw allow sshPORT - sed -i 's/#$nrconf{restart} = '"'"'i'"'"';/$nrconf{restart} = '"'"'a'"'"';/g' /etc/needrestart/needrestart.conf - sed -i "s/#\$nrconf{kernelhints} = -1;/\$nrconf{kernelhints} = -1;/g" /etc/needrestart/needrestart.conf @@ -80,5 +79,6 @@ runcmd: - update-rc.d fail2ban enable - /etc/init.d/fail2ban restart - grub-mkconfig -o /boot/grub/grub.cfg + - systemctl restart sshd - rm -rf /etc/cloud/cloud.cfg.d/99-fake_cloud.cfg - touch /etc/cloud/cloud-init.disabled