[Unit]
Description=Pi Car Companion network activity observer
After=NetworkManager.service pi-car-companion-network.service
Wants=NetworkManager.service

[Service]
Type=simple
EnvironmentFile=/etc/pi-car-companion/companion.env
Environment=HOME=/var/lib/pi-car-companion
WorkingDirectory=/opt/pi-car-companion/current
ExecStart=/usr/bin/node /opt/pi-car-companion/current/server/dist/network-observer.js
Restart=on-failure
RestartSec=5s
TimeoutStopSec=15s
UMask=0027
NoNewPrivileges=true
PrivateTmp=true
ProtectHome=true
ProtectKernelTunables=true
ProtectKernelModules=true
ProtectControlGroups=true
RestrictRealtime=true
LockPersonality=true
SystemCallArchitectures=native
RestrictAddressFamilies=AF_UNIX AF_INET AF_INET6 AF_NETLINK
ReadWritePaths=/var/lib/pi-car-companion

[Install]
WantedBy=multi-user.target
