mirror of
https://gitea.blesmrt.net/mikaela/shell-things.git
synced 2024-11-04 16:49:22 +01:00
systemd/system: write tlp-masker.bash instead of having symlinks to /dev/null
This commit is contained in:
parent
7d8fe8c1fa
commit
85dbc413f0
4
etc/systemd/system/.gitignore
vendored
4
etc/systemd/system/.gitignore
vendored
@ -1,4 +0,0 @@
|
||||
NetworkManager-wait-online.service
|
||||
systemd-networkd-wait-online.service
|
||||
power-profiles-daemon.service
|
||||
systemd-rfkill.service
|
@ -1 +0,0 @@
|
||||
/dev/null
|
@ -1 +0,0 @@
|
||||
/dev/null
|
@ -1 +0,0 @@
|
||||
/dev/null
|
@ -1 +0,0 @@
|
||||
/dev/null
|
23
etc/systemd/system/tlp-masker.bash
Executable file
23
etc/systemd/system/tlp-masker.bash
Executable 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
|
Loading…
Reference in New Issue
Block a user