[Unit]
Description=ESP32 Device Gateway
After=network-online.target
Wants=network-online.target

[Service]
Type=simple
WorkingDirectory=%h/esp32-dev
Environment=PYTHONUNBUFFERED=1
EnvironmentFile=%h/.config/esp32-device-gateway/gateway.env
ExecStart=%h/esp32-dev/scripts/run-server.sh
Restart=on-failure
RestartSec=5
TimeoutStopSec=20
KillSignal=SIGINT
StandardOutput=journal
StandardError=journal
SyslogIdentifier=device-gateway
NoNewPrivileges=yes
PrivateTmp=yes

[Install]
WantedBy=default.target
