Commit a5d709

2026-08-13 15:08:22 Niklas Polke: Add UMask to SYSTEMD
linux/systemd.md ..
@@ 27,6 27,7 @@
# RemainAfterExit=no
User=<user for script>
Group=<group of files?>
+ UMask=0002
Environment=HOME=<home directory>
ExecStart=<script with absolute path>
# ExecStart=/usr/bin/flock --nonblock /tmp/<lock filename>.lock <script with absolute path>
@@ 38,6 39,7 @@
- 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
- additional line `RemainAfterExit=yes` would be for things like `mount` which result is *active* even if the service has exited - then also an additional lne for `ExecStop` would be necessary to `unmount` the service
+ - UMask means rights that are removed from created files (0002 - remove write rights for other)
- Environment could also be directory of python (inside a virtual environment)
- flock create lock file to prevent different backups running in parallel
- nonblock means, that additional starts doesn't wait but stop executing
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