mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-18 08:48:27 -04:00
switch to hybrid
This commit is contained in:
@@ -0,0 +1,19 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
|
||||
# check npm exists
|
||||
if [ -f /usr/bin/npm ]; then
|
||||
echo "creating npm global folder in /config"
|
||||
mkdir -p /config/npm-global
|
||||
|
||||
echo "setting npm to global folder in /config"
|
||||
npm config set prefix '/config/npm-global'
|
||||
|
||||
if grep -q "/config/npm-global/bin" "/etc/services.d/code-server/run"; then
|
||||
echo "npm-global already in PATH"
|
||||
else
|
||||
echo "ensuring npm-global is in PATH"
|
||||
sed -i '/^#!\/usr\/bin/a \\n# Added by codeserver-npmglobal\nexport PATH=/config/npm-global/bin:$PATH' /etc/services.d/code-server/run
|
||||
fi
|
||||
else
|
||||
echo "**** npm not installed, skipping npmglobal install ****"
|
||||
fi
|
||||
@@ -0,0 +1 @@
|
||||
onehsot
|
||||
@@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-code-server-npmglobal-install/run
|
||||
Reference in New Issue
Block a user