| 1 | [Unit] |
| 2 | Description=RailControl - Control and automate your model railway |
| 3 | StartLimitInterval=15 |
| 4 | StartLimitBurst=4 |
| 5 | Documentation=file:///usr/share/doc/railcontrol/README.Debian |
| 6 | Documentation=man:railcontrol.1 |
| 7 | Documentation=https://www.railcontrol.org/index.php/en/documentation-en |
| 8 | Wants=network-online.target |
| 9 | After=network-online.target |
| 10 | |
| 11 | [Service] |
| 12 | # An absolute path to an SQLite database file does not work in railcontrol.conf. |
| 13 | # Therefore we set $HOME and set the SQLite base filename without an absolute |
| 14 | # path to work around that limitation. |
| 15 | #WorkingDirectory=/var/lib/railcontrol |
| 16 | ExecStart=/usr/bin/railcontrol --config=/etc/railcontrol.conf --logfile=/dev/null |
| 17 | Type=exec |
| 18 | User=_railcontrol |
| 19 | Group=_railcontrol |
| 20 | #Restart=on-failure |
| 21 | Restart=always |
| 22 | RestartSec=1 |
| 23 | TimeoutStopSec=2min |
| 24 | CPUWeight=10000 |
| 25 | Nice=-20 |
| 26 | IOSchedulingClass=realtime |
| 27 | IOSchedulingPriority=0 |
| 28 | |
| 29 | # Hardening |
| 30 | SystemCallArchitectures=native |
| 31 | MemoryDenyWriteExecute=true |
| 32 | NoNewPrivileges=true |
| 33 | |
| 34 | [Install] |
| 35 | WantedBy=default.target |