mirror of
https://github.com/linuxserver/docker-mods.git
synced 2026-02-06 13:40:04 +08:00
switch to hybrid
This commit is contained in:
parent
09d40ea8f3
commit
2f7ceb44c0
36
root/etc/s6-overlay/s6-rc.d/init-mod-swag-dashboard-add-package/run
Executable file
36
root/etc/s6-overlay/s6-rc.d/init-mod-swag-dashboard-add-package/run
Executable file
@ -0,0 +1,36 @@
|
||||
#!/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
|
||||
|
||||
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
|
||||
chown -R abc:abc \
|
||||
/dashboard \
|
||||
/config/nginx/proxy-confs/dashboard.subdomain.conf
|
||||
|
||||
echo "**** Applied the SWAG dashboard mod ****"
|
||||
@ -0,0 +1 @@
|
||||
oneshot
|
||||
@ -0,0 +1 @@
|
||||
/etc/s6-overlay/s6-rc.d/init-mod-swag-dashboard-add-package/run
|
||||
Loading…
x
Reference in New Issue
Block a user