Skip to content

Instantly share code, notes, and snippets.

@garettmd
Forked from ewenchou/README.md
Created December 13, 2017 15:29
Show Gist options
  • Save garettmd/ee1ff21162feff6c60ba86f118a4d7d6 to your computer and use it in GitHub Desktop.
Save garettmd/ee1ff21162feff6c60ba86f118a4d7d6 to your computer and use it in GitHub Desktop.
Run Python script as systemd service
  1. Create a service file like dash_sniffer.service
  2. Put it in /lib/systemd/system/
  3. Reload systemd using command: systemctl daemon-reload
  4. Enable auto start using command: systemctl enable dash_sniffer.service
[Unit]
Description=Dash Button Sniffer
[Service]
Type=simple
ExecStart=/usr/bin/dash_sniffer.py
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment