Skip to content

Instantly share code, notes, and snippets.

@gadgetmies
Created September 7, 2025 11:37
Show Gist options
  • Select an option

  • Save gadgetmies/94983b45d96a92cf146298fbc8747f90 to your computer and use it in GitHub Desktop.

Select an option

Save gadgetmies/94983b45d96a92cf146298fbc8747f90 to your computer and use it in GitHub Desktop.
Start service after SPI becomes available
# Add the following to /etc/udev/rules.d/90-service_name.rules:
SUBSYSTEM=="spidev", KERNEL=="spidev0.0", TAG+="systemd", ENV{SYSTEMD_WANTS}+="s/etc/systemd/system/"
# Add the following to /etc/systemd/system/service_name.service
Requires=dev-spidev0.0.device
After=dev-spidev0.0.device
ConditionPathExists=/dev/spidev0.0
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment