From b5753d448c2097d8bc8b7c79ab2eb633f227c67e Mon Sep 17 00:00:00 2001 From: sky Date: Fri, 13 Dec 2024 22:26:06 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20simpleadmin/console/menu/c?= =?UTF-8?q?hange=5Fhostname.sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- simpleadmin/console/menu/change_hostname.sh | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/simpleadmin/console/menu/change_hostname.sh b/simpleadmin/console/menu/change_hostname.sh index ccd7639..3e47d08 100644 --- a/simpleadmin/console/menu/change_hostname.sh +++ b/simpleadmin/console/menu/change_hostname.sh @@ -39,10 +39,10 @@ hostname "$new_hostname" cat > /lib/systemd/system/set-hostname.service << EOF [Unit] Description=Set system hostname at boot -After=network.target [Service] Type=oneshot +ExecStartPre=/bin/sleep 10 ExecStart=/bin/sh -c 'hostname \$(cat /etc/hostname)' RemainAfterExit=yes