Created
July 8, 2019 20:58
-
-
Save hayleyxyz/04769c6a5822da66561e16f13213a083 to your computer and use it in GitHub Desktop.
systemd service to automatically toggle swapon when a certain usb drive is installed
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
[Unit] | |
Description=Flash drive swapon | |
Requires=dev-disk-by\x2duuid-7849984a\x2de42f\x2d497a\x2dafec\x2d8bebb8384f7a.device | |
After=dev-disk-by\x2duuid-7849984a\x2de42f\x2d497a\x2dafec\x2d8bebb8384f7a.device | |
[Service] | |
ExecStart=/sbin/swapon -U 7849984a-e42f-497a-afec-8bebb8384f7a | |
[Install] | |
WantedBy=dev-disk-by\x2duuid-7849984a\x2de42f\x2d497a\x2dafec\x2d8bebb8384f7a.device |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment