更新 scripts/system_optimize.sh

This commit is contained in:
joy 2025-07-16 13:10:31 +08:00
parent 7e0ae1bd0c
commit 2558cbfc21
1 changed files with 9 additions and 0 deletions

View File

@ -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 "系统配置完成!"
}