Fix version links change the mod to the alpine pkg

This commit is contained in:
quietsy
2023-04-01 10:31:15 +03:00
parent 6e6ddfb166
commit d56a8dde53
5 changed files with 31 additions and 136 deletions
-30
View File
@@ -1,30 +0,0 @@
#!/usr/bin/with-contenv bash
echo "Applying the SWAG dashboard mod..."
ARCH=$(uname -m)
if [ -d "/goaccess/${ARCH}" ]; then
echo "**** Installing/updating goaccess ****"
cp -a /goaccess/${ARCH}/* /
rm -rf /goaccess
else
echo "**** Goaccess already installed and up to date ****"
fi
apk add --no-cache libmaxminddb
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
chown -R abc:abc \
/dashboard \
/config/nginx/proxy-confs/dashboard.subdomain.conf
echo "Applied the SWAG dashboard mod"
@@ -2,13 +2,11 @@
echo "**** Applying the SWAG dashboard mod... ****"
ARCH=$(uname -m)
if [ -d "/goaccess/${ARCH}" ]; then
echo "**** Installing/updating goaccess ****"
cp -a /goaccess/${ARCH}/* /
rm -rf /goaccess
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 and up to date ****"
echo "**** goaccess already installed, skipping ****"
fi
if ! apk info 2>&1 | grep -q "libmaxminddb"; then