example.service
· 301 B · SYSTEMD
Raw
[Unit]
Description=description of the service
After=network.target
[Service]
User=specific user for this service
Group=specific user for this service
WorkingDirectory=directory from which to run the service
ExecStart=command to run the service
Restart=on-failure
[Install]
WantedBy=multi-user.target
| 1 | [Unit] |
| 2 | Description=description of the service |
| 3 | After=network.target |
| 4 | |
| 5 | [Service] |
| 6 | User=specific user for this service |
| 7 | Group=specific user for this service |
| 8 | WorkingDirectory=directory from which to run the service |
| 9 | ExecStart=command to run the service |
| 10 | Restart=on-failure |
| 11 | |
| 12 | [Install] |
| 13 | WantedBy=multi-user.target |