[Unit] Description=BubbleCam e-Paper status display After=bubblecam-rtc-sync.service local-fs.target Wants=bubblecam-rtc-sync.service [Service] Type=simple ExecStart=/opt/bubblecam/bin/epaper_display.py Restart=on-failure RestartSec=10 User=root # Hard backstop against the failure that took this Pi off the network: the # display spawns ffmpeg to grab preview frames, and an over-large capture # once exhausted all 512MB (swap is disabled), letting the kernel OOM # killer pick off NetworkManager. Cap the whole cgroup -- ffmpeg children # included -- so a runaway preview kills only itself, and make this # non-mission-critical service the preferred OOM victim if memory ever # does get tight elsewhere. MemoryMax=150M OOMScoreAdjust=500 [Install] WantedBy=multi-user.target