Skip to content

Commit

Permalink
Improve robustness of portproxy.service
Browse files Browse the repository at this point in the history
  • Loading branch information
nullpo-head committed Nov 7, 2021
1 parent ddaccd9 commit 6c2914d
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions distrod_packer/resources/run/systemd/system/portproxy.service
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ Wants=network-online.target systemd-networkd-wait-online.service
Restart=on-failure
RestartSec=15

# WSL_INTEROP and other variables should be set by systemd even without sourcing /etc/environment,
# but if a user enable this just after they updated systemd (apt-upgrade or pacman -Syu), then
# systemd will forget those variables due to restart. So, source /etc/environment just in case.
ExecStart=/bin/sh -c '/opt/distrod/bin/portproxy.exe proxy $(/opt/distrod/bin/portproxy show ipv4) -t $(cat /opt/distrod/conf/tcp4_ports)'
EnvironmentFile=/etc/environment

[Install]
WantedBy=multi-user.target

0 comments on commit 6c2914d

Please sign in to comment.