Ich habe mit Python einen Daemon erstellt, also ein Memo der Prozedur
| Umgebung | Ausführung | 
|---|---|
| OS | 2020-05-27-raspios-buster-arm64 | 
| Python | 3.7.3 | 
| python3-systemd | 234-2+b1 | 
sudo apt-get install python-systemd python3-systemd~ / foo.py mit dem folgenden Inhaltfrom systemd import journal
journal.send('Hello world')
journal.send('Hello, again, world', FIELD2='Greetings!', FIELD3='Guten tag')
journal.send('Binary message', BINARY=b'\xde\xad\xbe\xef')
chmod 755 ~/foo.py[Unit]
Description = Foo
[Service]
ExecStart = python3 /home/pi/foo.py
Restart = always
Type = simple
[Install]
WantedBy = multi-user.target
sudo systemctl enable foo.servicesudo systemctl start foo.servicesystemctl status roomenv.serviceRecommended Posts