systemd/system: write tlp-masker.bash instead of having symlinks to /dev/null

This commit is contained in:
Aminda Suomalainen 2023-12-25 17:27:30 +02:00
parent 7d8fe8c1fa
commit 85dbc413f0
Signed by: Mikaela
SSH Key Fingerprint: SHA256:CXLULpqNBdUKB6E6fLA1b/4SzG0HvKD19PbIePU175Q
6 changed files with 23 additions and 8 deletions

View File

@ -1,4 +0,0 @@
NetworkManager-wait-online.service
systemd-networkd-wait-online.service
power-profiles-daemon.service
systemd-rfkill.service

View File

@ -1 +0,0 @@
/dev/null

View File

@ -1 +0,0 @@
/dev/null

View File

@ -1 +0,0 @@
/dev/null

View File

@ -1 +0,0 @@
/dev/null

View File

@ -0,0 +1,23 @@
#!/usr/bin/env bash
# This is a simple script to mask services in conflict with tlp
set -x
# and when doing that, why not enable tlp?
tlp start
tlp-rdw enable
# The service is only meant for boot so no starting now
systemctl enable tlp.service
# Stop the services if they are running
systemctl disable --quiet --now power-profiles-daemon.service
systemctl disable --quiet --now systemd-rfkill.service
# Actual masking
systemctl mask power-profiles-daemon.service
systemctl mask systemd-rfkill.service systemd-rfkill.socket
# In case this script is ran multiple times in succession like when I did
# when writing it
systemctl daemon-reload
set +x