Last active
July 24, 2022 11:13
-
-
Save KaiserWerk/bcb79185145f542f7b111d352637c482 to your computer and use it in GitHub Desktop.
Barebone systemd user service
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
// 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