system76-power-profile-default.sh
· 491 B · Bash
Raw
#!/usr/bin/env bash
# as superuser
sudo su
# write a systemd service file to set profile after system76-power service starts
cat <<EOF > /etc/systemd/system/system76-power-profile-default.service
[Unit]
Description=Set the profile profile at startup.
After=system76-power.service
[Service]
Type=simple
ExecStart=/bin/bash -c 'system76-power profile performance'
[Install]
WantedBy=default.target
EOF
# enable our new service
systemctl enable system76-power-profile-default
exit
exit 0
| 1 | #!/usr/bin/env bash |
| 2 | # as superuser |
| 3 | sudo su |
| 4 | |
| 5 | # write a systemd service file to set profile after system76-power service starts |
| 6 | cat <<EOF > /etc/systemd/system/system76-power-profile-default.service |
| 7 | [Unit] |
| 8 | Description=Set the profile profile at startup. |
| 9 | After=system76-power.service |
| 10 | |
| 11 | [Service] |
| 12 | Type=simple |
| 13 | ExecStart=/bin/bash -c 'system76-power profile performance' |
| 14 | |
| 15 | [Install] |
| 16 | WantedBy=default.target |
| 17 | EOF |
| 18 | |
| 19 | # enable our new service |
| 20 | systemctl enable system76-power-profile-default |
| 21 | |
| 22 | exit |
| 23 | |
| 24 | exit 0 |