add env.sh

This commit is contained in:
Alex Holliday committed 2025-04-20 11:40:32 -07:00
1 parent 9fd4d6c0b8
commit 8ac0c71a0a
1 file changed
+8
Executable
+8
View File
@@ -0,0 +1,8 @@
#!/bin/sh
for i in $(env | grep UPTIME_APP_)
do
key=$(echo $i | cut -d '=' -f 1)
value=$(echo $i | cut -d '=' -f 2-)
echo $key=$value
find /usr/share/nginx/html -type f \( -name '*.js' -o -name '*.css' \) -exec sed -i "s|${key}|${value}|g" '{}' +
done