更新 simpleadmin/console/menu/change_hostname.sh

This commit is contained in:
sky 2024-12-13 22:26:06 +08:00
parent dcbafa84bf
commit b5753d448c

View File

@ -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