[Unit]
Description=MARS NWE Web UI
After=network.target mars-nwe-serv.service
Wants=network.target
Documentation=man:systemd.service(5)

[Service]
Type=simple
User=root
Group=root
RuntimeDirectory=mars-nwe-webui
RuntimeDirectoryMode=0700
WorkingDirectory=/

ExecStartPre=/bin/mkdir -p @MARS_NWE_LOG_DIR@
ExecStartPre=/bin/mkdir -p @MARS_NWE_PID_DIR@
ExecStart=@CMAKE_INSTALL_FULL_SBINDIR@/nwwebui -c @MARS_NWE_INSTALL_FULL_CONFDIR@/smart.conf
Restart=on-failure
RestartSec=2

NoNewPrivileges=true
PrivateTmp=true
ProtectSystem=full
ReadWritePaths=@MARS_NWE_INSTALL_FULL_CONFDIR@
ProtectHome=true

[Install]
WantedBy=multi-user.target
