Skip to content

Instantly share code, notes, and snippets.

@Carry00
Created July 22, 2024 14:15
Show Gist options
  • Save Carry00/7a49cd662a82e81519b952505017207e to your computer and use it in GitHub Desktop.
Save Carry00/7a49cd662a82e81519b952505017207e to your computer and use it in GitHub Desktop.
[Unit]
Description=My Custom Service
After=network.target
[Service]
Type=simple
User=myuser
Group=mygroup
WorkingDirectory=/path/to/working/directory
ExecStart=/path/to/executable --option1 value1 --option2 value2
Restart=on-failure
RestartSec=5
Environment="ENV_VAR1=value1" "ENV_VAR2=value2"
LimitNOFILE=4096
[Install]
WantedBy=multi-user.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment