M
M
Michael2021-10-26 17:04:55
linux
Michael, 2021-10-26 17:04:55

What rights does the script lack for autorun?

Hello.
I understand the question is Nubian, and before asking it here, I googled it, including here - it doesn’t work
Task, on the old laptop, automatically run this
OS Linux Mint 20.2 script

#!/bin/sh
for cf in /sys/devices/system/cpu/cpu*/cpufreq/scaling_governor;
do
echo performance > $cf;
#echo powersave > $cf;
done


the axis swears at the fact that access denied although he did chmod and gave the rights to start - in short, according to all the manuals
PS in the console, he works from root without problems and performs functions - but does not work in autoload

Answer the question

In order to leave comments, you need to log in

1 answer(s)
A
Alexander Karabanov, 2021-10-26
@happy-cat

[Unit]
Description=Turn on performance mode for CPU

[Service]
Type=oneshot
User=root
ExecStart=/root/antidropcpu.sh
[Install]
WantedBy=multi-user.target

Didn't find what you were looking for?

Ask your question

Ask a Question

731 491 924 answers to any question