更新 scripts/system_optimize.sh
This commit is contained in:
parent
dc9eb3d19e
commit
28b780ad9c
|
|
@ -38,7 +38,7 @@ disable_apt_periodic_updates() {
|
|||
sed -i 's/1/0/g' /etc/apt/apt.conf.d/10periodic &>/dev/null;
|
||||
# 修改20auto-upgrades配置文件,将所有的1改为0,禁用自动升级
|
||||
sed -i 's/1/0/g' /etc/apt/apt.conf.d/20auto-upgrades &>/dev/null;
|
||||
log_info "[02]-Apt 定期更新功能已禁用!"
|
||||
log_info "[02]-禁用 Apt 定期更新功能"
|
||||
}
|
||||
|
||||
|
||||
|
|
@ -59,14 +59,14 @@ synchronize_hardware_clock() {
|
|||
log_info "[04]-执行系统内核锁定操作中"
|
||||
# 使用hwclock命令将系统时间同步到硬件时钟
|
||||
hwclock --systohc
|
||||
log_info "[04]-系统内核锁定操作已完成!"
|
||||
log_info "[04]-系统内核锁定操作已完成"
|
||||
}
|
||||
|
||||
#关闭休眠
|
||||
off_sleep(){
|
||||
log_info "[05]-执行关闭系统休眠操作中"
|
||||
systemctl mask sleep.target suspend.target hibernate.target hybrid-sleep.target &>> /tmp/2.log
|
||||
log_info "[05]-系统休眠功能已关闭完成!"
|
||||
log_info "[05]-系统休眠功能已关闭完成"
|
||||
}
|
||||
|
||||
|
||||
|
|
|
|||
Loading…
Reference in New Issue