Skip to content

Instantly share code, notes, and snippets.

@toke
Created March 22, 2017 19:26
Show Gist options
  • Star 3 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save toke/f24eead85c390fbed30c6d0749620bc3 to your computer and use it in GitHub Desktop.
Save toke/f24eead85c390fbed30c6d0749620bc3 to your computer and use it in GitHub Desktop.
Dell dock udev, systemd hook stuff for linux
SUBSYSTEMS=="usb", SYMLINK="delldock", ATTRS{idVendor}=="413c", ATTRS{idProduct}=="2513", ENV{DEVTYPE}=="usb_device", TAG+="systemd", ENV{SYSTEMD_WANTS}="dock.service"
[Unit]
Description="Docking event"
StartLimitAction=none
BindsTo=dev-delldock.device
After=dev-delldock.device
[Service]
ExecStart=/home/toke/bin/dock dock
ExecStop=/home/toke/bin/dock undock
RemainAfterExit=yes
KillMode=none
Type=oneshot
User=toke
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment