mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-06 00:00:01 -04:00
switch to hybrid
This commit is contained in:
@@ -0,0 +1,25 @@
|
||||
#!/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
|
||||
if ! grep -q -E '^(export )?PATH=.*/config/go/bin:.*' /etc/services.d/code-server/run; then
|
||||
sed -i 's/PATH=/PATH=\/config\/go\/bin:/g' /etc/services.d/code-server/run
|
||||
fi
|
||||
else
|
||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-golang\nexport PATH=/config/go/bin:$PATH:/usr/local/go/bin' /etc/services.d/code-server/run
|
||||
fi
|
||||
|
||||
ARCH=$(uname -m)
|
||||
if [ -f "/golang/golang_${ARCH}.tar.gz" ]; then
|
||||
echo "**** Installing golang ****"
|
||||
tar xzf "/golang/golang_${ARCH}.tar.gz" -C /usr/local
|
||||
rm -rf /golang
|
||||
|
||||
echo "**** Adding gcc to package install list, to make CGO work ****"
|
||||
echo "gcc" >> /mod-repo-packages-to-install.list
|
||||
else
|
||||
echo "**** Golang already installed, skipping ****"
|
||||
fi
|
||||
@@ -0,0 +1 @@
|
||||
oneshot
|
||||
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-code-server-golang-add-package/run
|
||||
Reference in New Issue
Block a user