Skip to content

Commit 6c2914d

Browse files
committed
Improve robustness of portproxy.service
1 parent ddaccd9 commit 6c2914d

File tree

1 file changed

+4
-0
lines changed

1 file changed

+4
-0
lines changed

distrod_packer/resources/run/systemd/system/portproxy.service

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ Wants=network-online.target systemd-networkd-wait-online.service
77
Restart=on-failure
88
RestartSec=15
99

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

1216
[Install]
1317
WantedBy=multi-user.target

0 commit comments

Comments
 (0)