sudo mkdir /usr/lib/systemd/system/
sudo touch /usr/lib/systemd/system/babette.service
nano /usr/lib/systemd/system/babette.service
écris
[Service]
ExecStart=/home/pi/babette.py
Restart=always
StandardOutput=syslog
StandardError=syslog
SyslogIdentifier=babette
User=root
[Install]
WantedBy=multi-user.target
puis lance
sudo systemctl enable babette