Skip to content

Instantly share code, notes, and snippets.

@KaiserWerk
Last active July 24, 2022 11:13
Show Gist options
  • Save KaiserWerk/bcb79185145f542f7b111d352637c482 to your computer and use it in GitHub Desktop.
Save KaiserWerk/bcb79185145f542f7b111d352637c482 to your computer and use it in GitHub Desktop.
Barebone systemd user service
// place into ~/.config/systemd/user/your-service-file.service
// more info: https://www.unixsysadmin.com/systemd-user-services/
[Unit]
Description=Run dummy service as user X
DefaultDependencies=no
After=network.target
[Service]
Type=simple
ExecStart=/path/to/your/executable
WorkingDirectory=/path/to/your
TimeoutStartSec=1
RemainAfterExit=yes
Restart=always
RestartSec=15
[Install]
WantedBy=default.target
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment