Tips, tricks and manuals
Je bent niet ingelogd.
In console as root:
nano /lib/systemd/system/yourapp.service[Unit]
Description=yourapp Service
After=multi-user.target
Conflicts=getty@tty1.service
[Service]
Type=simple
ExecStart=/usr/bin/python3 /path/to/your/app.py
StandardInput=tty-force
Restart=on-failure
[Install]
WantedBy=multi-user.targetsystemctl daemon-reload
systemctl enable yourapp.service
systemctl start yourapp.service
systemctl status yourapp.service
systemctl stop yourapp.service
systemctl start yourapp.service
systemctl status yourapp.service
systemctl restart yourapp.serviceMocht de app niet goed starten of als je de app wil starten vanaf de commandprompt dan kan je ook een apploop.sh maken.
nano apploop.shwhile true
do
python3 yourapp.py
doneMaak apploop.sh als programma uitvoerbaar en start de loop:
./apploop.shOffline