cpuwrangler/cpuwrangler.bash
kake26 278f8db427 Update 'cpuwrangler.bash'
Fixed a few dumb errors with bash variables
2021-05-22 03:33:59 +02:00

19 lines
435 B
Bash

#!/bin/bash
# Some variables
sysdu="" # location to pull the systemd unit from github
cur_gov=$(cat /sys/devices/system/cpu/cpu0/cpufreq/scaling_governor)
cpugov="conservative" # set what you want here
# First, are running as root?
if [[ $EUID -ne 0 ]]; then
echo "This script must be run as root"
exit 1
fi
# Default action is to reapply settings
echo $cpugov | tee /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor