How-to Feed Plane Plotter Site directly from Raspberry Pi

@Aerovision1

Thanks to @wiedehopf. Adding only one line (PartOf=…) to file ppup1090.service was enough. I tested it. Every time the dump1090 is started, ppup1090 also get started automatically, and CPU usage stays at below 1%

Service file of ppup1090, if using dump1090-fa

sudo nano /lib/systemd/system/ppup1090.service
# planeplotter uploader service for systemd
# create in /lib/systemd/system/
# then install in /etc/systemd/system/default.target.wants/
# by command: sudo systemctl enable ppup1090.service

[Unit]
Description=PlanePlotter Raspberry Pi uploader
Wants=network-online.target
After=dump1090-fa.service network-online.target time-sync.target
PartOf=dump1090-fa.service

[Service]
User=ppup1090
RuntimeDirectory=ppup
ExecStart=/home/pi/ppup/ppup1090 --quiet
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed
RestartPreventExitStatus=4 6

[Install]
WantedBy=default.target

Service file of ppup1090, if using dump1090-mutability

sudo nano /lib/systemd/system/ppup1090.service
# planeplotter uploader service for systemd
# create in /lib/systemd/system/
# then install in /etc/systemd/system/default.target.wants/
# by command: sudo systemctl enable ppup1090.service

[Unit]
Description=PlanePlotter Raspberry Pi uploader
Wants=network-online.target
After=dump1090-mutability.service network-online.target time-sync.target
PartOf=dump1090-mutability.service

[Service]
User=ppup1090
RuntimeDirectory=ppup
ExecStart=/home/pi/ppup/ppup1090 --quiet
ExecReload=/bin/kill -HUP $MAINPID
Type=simple
Restart=on-failure
RestartSec=30
# exit code 4 means login failed
# exit code 6 means startup failed
RestartPreventExitStatus=4 6

[Install]
WantedBy=default.target