Commit f00298

2026-08-13 13:12:53 Niklas Polke: Update Systemd Configuration
linux/systemd.md ..
@@ 16,23 16,24 @@
sudo nano /etc/systemd/system/<servicename>.service
```
- ```
+ ```bash
[Unit]
Description=<what the service / called script does>
- Wants=network-online.target
- After=network-online.target
+ # Wants=network-online.target
+ # After=network-online.target
[Service]
Type=oneshot|simple
- RemainAfterExit=no
+ # RemainAfterExit=no
User=<user for script>
Group=<group of files?>
Environment=HOME=<home directory>
- ExecStart=/usr/bin/flock --nonblock /tmp/<lock filename>.lock <script with absolute path>
- ExecStop=
+ ExecStart=<script with absolute path>
+ # ExecStart=/usr/bin/flock --nonblock /tmp/<lock filename>.lock <script with absolute path>
+ # ExecStop=
- [Install]
- WantedBy=multi-user.target|timers.target
+ # [Install]
+ # WantedBy=multi-user.target|timers.target
```
- wants/after network-online.target mean that this service needs the network to be online
- Type `oneshot` is for short running tasks like backup scripts, `simple` for permanently running things like server and databases
0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9 0 1 2 3 4 5 6 7 8 9