admin_grundlagen:systemd_path_unit_files
Path Activation Beispiel "Die ultimative Maschine"
systemctl edit --full --force paac.service
- /etc/systemd/system/paac.service
[Unit] Description=Path Activation Service [Service] Type=oneshot ExecStart=sh -c 'for f in /tmp/paac/*; do echo "lösche $f: $(cat $f)"; rm "$f"; done'
systemctl edit --full --force paac.path
- /etc/systemd/system/paac.path
[Unit] Description=Demonstrate Path Activation [Path] MakeDirectory=true PathChanged=/tmp/paac [Install] WantedBy=default.target
systemctl start paac.path
Ausprobieren
echo test > /tmp/paac/file journalctl -fu paac.service
admin_grundlagen/systemd_path_unit_files.txt · Zuletzt geändert: 2022/04/22 14:05 von ingo_wichmann
