mirror of
https://gitdl.cn/https://github.com/chakralinux/desktop.git
synced 2025-02-09 14:07:17 +08:00
14 lines
234 B
Bash
Executable File
14 lines
234 B
Bash
Executable File
#!/bin/sh
|
|
|
|
num_cpus=$(grep -c processor /proc/cpuinfo)
|
|
[ "$num_cpus" != 0 ] || num_cpus=1
|
|
|
|
last_cpu=$((num_cpus - 1))
|
|
|
|
for i in $(seq 0 $last_cpu); do
|
|
grep -q "/dev/zram$i" /proc/swaps && swapoff /dev/zram$i
|
|
done
|
|
|
|
sleep 1
|
|
rmmod zram
|