mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-04 07:14:22 -04:00
11 lines
453 B
Plaintext
11 lines
453 B
Plaintext
#!/usr/bin/with-contenv bash
|
|
|
|
echo "ensuring golang is in PATH"
|
|
if grep -q -E '^(export )?PATH=' /etc/services.d/code-server/run; then
|
|
if ! grep -q -E '^(export )?PATH=.*/usr/local/go/bin.*' /etc/services.d/code-server/run; then
|
|
sed -i '/PATH/ s/$/:\/usr\/local\/go\/bin/' /etc/services.d/code-server/run
|
|
fi
|
|
else
|
|
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-golang\nexport PATH=$PATH:/usr/local/go/bin' /etc/services.d/code-server/run
|
|
fi
|