[Unit] Description=Photobooth backend After=network.target graphical.target Wants=graphical.target [Service] Type=notify User=jules WorkingDirectory=/home/jules/photobooth ExecStart=/home/jules/photobooth/scripts/start.sh ExecStopPost=/bin/bash -c 'pkill -9 -f "python.*backend.main" 2>/dev/null; sleep 1' Restart=always RestartSec=3 WatchdogSec=30 KillMode=control-group KillSignal=SIGTERM TimeoutStopSec=10 StartLimitIntervalSec=120 StartLimitBurst=10 Environment=DISPLAY=:0 Environment=XAUTHORITY=/home/jules/.Xauthority AmbientCapabilities=CAP_NET_BIND_SERVICE [Install] WantedBy=graphical.target