Created
October 6, 2021 18:00
-
-
Save kiwimato/f985ce1504c1acdc48b018774fa51b85 to your computer and use it in GitHub Desktop.
Creates a service which automatically restarts chronyd after suspend or hibernation upon resume
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
cat > /usr/lib/systemd/system/chronyd-restart-after-sleep.service <<'EOF' | |
[Unit] | |
Description=Restart Bluetooth after resume | |
After=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target | |
[Service] | |
Type=simple | |
ExecStart=/usr/bin/systemctl --no-block restart chronyd | |
#ExecStart=/usr/bin/systemctl --no-block restart bluetooth.service | |
[Install] | |
WantedBy=suspend.target hibernate.target hybrid-sleep.target suspend-then-hibernate.target | |
EOF | |
systemctl enable chronyd-restart-after-sleep |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment