\
\
"forge networking create nat hole systemd unit"
NatHolePunch.exe exit with [ERROR] FATAL UNHANDLED EXCEPTION: System.NullReferenceException:
if don’t have any terminal
attached and in the systemd unit is needed to specify StandardInput
, TTYPath
and optinally for see the logs StandardOutput
.
Here is an example, nathole
is my unprivileged system user:
# /etc/systemd/system/nathole.service
[Unit]
Description=Forge Networking Nat Hole Punch Server
After=syslog.target network.target
[Service]
User=nathole
Group=nathole
Environment="PATH=/home/nathole/bin:/usr/local/bin:/usr/bin:/bin:/usr/local/games:/usr/games:/snap/bin"
ExecStart=/home/nathole/bin/NatHolePunch.exe
WorkingDirectory=/home/nathole/bin
StandardInput=tty
TTYPath=/dev/tty2
StandardOutput=journal+console
[me@blog]$
_