Skip to content

Instantly share code, notes, and snippets.

@brunneis
Created October 31, 2019 08:39
Show Gist options
  • Save brunneis/521dabe012e9f0abb4f30bef4525fea9 to your computer and use it in GitHub Desktop.
Save brunneis/521dabe012e9f0abb4f30bef4525fea9 to your computer and use it in GitHub Desktop.
Create a systemd service
  1. Create a service file at /usr/lib/systemd/system/<name>.service
  2. systemctl enable <name>
  3. systemctl start <name>

Service template:

[Unit]
Description=

[Service]
Type=notify # The systemd process will wait for this to happen before proceeding to other units
ExecStart=

[Install]
WantedBy=multi-user.target # The service will start when the system reach runlevel 2
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment