mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-06-29 03:33:19 -04:00
18 lines
569 B
Plaintext
Executable File
18 lines
569 B
Plaintext
Executable File
#!/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
|
|
lsiown abc:abc /config/npm-global
|
|
|
|
echo "setting npm to global folder in /config"
|
|
s6-setuidgid abc npm config set prefix '/config/npm-global'
|
|
|
|
if ! grep -q '/config/npm-global/bin' /var/run/s6/container_environment/PATH; then
|
|
sed -i '1s|^|/config/npm-global/bin:|' /var/run/s6/container_environment/PATH
|
|
fi
|
|
else
|
|
echo "**** npm not installed, skipping npmglobal install ****"
|
|
fi
|