mirror of
https://github.com/TrezOne/docker-mods-uptime-kuma-timeout-fix.git
synced 2026-07-20 10:21:36 -04:00
35 lines
1.4 KiB
Plaintext
Executable File
35 lines
1.4 KiB
Plaintext
Executable File
#!/usr/bin/with-contenv bash
|
|
|
|
echo "**** Applying the SWAG dashboard mod... ****"
|
|
|
|
if ! apk info 2>&1 | grep -q "goaccess"; then
|
|
echo "**** Adding goaccess to package install list ****"
|
|
echo "goaccess" >> /mod-repo-packages-to-install.list
|
|
else
|
|
echo "**** goaccess already installed, skipping ****"
|
|
fi
|
|
|
|
if ! apk info 2>&1 | grep -q "libmaxminddb"; then
|
|
echo "**** Adding libmaxminddb to package install list ****"
|
|
echo "libmaxminddb" >> /mod-repo-packages-to-install.list
|
|
else
|
|
echo "**** libmaxminddb already installed, skipping ****"
|
|
fi
|
|
|
|
cp -f /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf.sample
|
|
if [ ! -f /config/nginx/proxy-confs/dashboard.subdomain.conf ]; then
|
|
cp /dashboard/dashboard.subdomain.conf.sample /config/nginx/proxy-confs/dashboard.subdomain.conf
|
|
fi
|
|
|
|
if [ "$(sed -nE 's|## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' /dashboard/dashboard.subdomain.conf.sample)" != "$(sed -nE 's|## Version ([0-9]{4}\/[0-9]{2}\/[0-9]{2}).*|\1|p' /config/nginx/proxy-confs/dashboard.subdomain.conf)" ]; then
|
|
echo "**** The swag-dashboard conf has been updated ****"
|
|
echo "**** Compare the changes using the sample file: /config/nginx/proxy-confs/dashboard.subdomain.conf.sample"
|
|
fi
|
|
|
|
# permissions
|
|
lsiown -R abc:abc \
|
|
/dashboard \
|
|
/config/nginx/proxy-confs/dashboard.subdomain.conf
|
|
|
|
echo "**** Applied the SWAG dashboard mod ****"
|