From 2558cbfc21561d4f77d97df9a670ab004ac3274a Mon Sep 17 00:00:00 2001 From: joy Date: Wed, 16 Jul 2025 13:10:31 +0800 Subject: [PATCH] =?UTF-8?q?=E6=9B=B4=E6=96=B0=20scripts/system=5Foptimize.?= =?UTF-8?q?sh?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- scripts/system_optimize.sh | 9 +++++++++ 1 file changed, 9 insertions(+) diff --git a/scripts/system_optimize.sh b/scripts/system_optimize.sh index 1b7fca1..b8f1464 100644 --- a/scripts/system_optimize.sh +++ b/scripts/system_optimize.sh @@ -51,6 +51,14 @@ synchronize_hardware_clock() { log_info "硬件时钟和系统时钟已同步" } +#关闭休眠 +off_sleep(){ + log_info "关闭系统休眠!" + systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target &>> /tmp/2.log +} + + + # 删除"ubuntu"用户 #remove_ubuntu_user() { # log_info "删除'ubuntu'用户..." @@ -174,6 +182,7 @@ main() { synchronize_hardware_clock disable_nouveau_driver update_grub_configuration + off_sleep rename_hostname log_info "系统配置完成!" }