From c514c0cbb101447a1b1dfba6a1015b98b31457b4 Mon Sep 17 00:00:00 2001 From: ai-dev Date: Mon, 2 Sep 2024 23:09:44 +0200 Subject: [PATCH] Change documents path --- dolideb/config.yaml | 3 +-- dolideb/rootfs/etc/services.d/dolideb/run | 10 ++++++++++ 2 files changed, 11 insertions(+), 2 deletions(-) diff --git a/dolideb/config.yaml b/dolideb/config.yaml index f1c74b7..47488f1 100644 --- a/dolideb/config.yaml +++ b/dolideb/config.yaml @@ -7,8 +7,7 @@ arch: - amd64 url: https://dolibar.fr map: - - config:rw - - backup:rw + - share:rw image: docker.io/tuxgasy/dolibarr init: false ingress: true diff --git a/dolideb/rootfs/etc/services.d/dolideb/run b/dolideb/rootfs/etc/services.d/dolideb/run index 93a5e78..55153e2 100644 --- a/dolideb/rootfs/etc/services.d/dolideb/run +++ b/dolideb/rootfs/etc/services.d/dolideb/run @@ -1,3 +1,13 @@ #!/usr/bin/execlineb -P with-contenv + +# Change the document root path in the Dolibarr configuration files +if [ -f /var/www/htdocs/conf/conf.php ]; then + sed -i "s|/var/www/documents|/share/smaf/documents|g" /var/www/htdocs/conf/conf.php +fi + +if [ -f /var/www/html/conf/conf.php ]; then + sed -i "s|/var/www/documents|/share/smaf/documents|g" /var/www/html/conf/conf.php +fi + /usr/sbin/apachectl -D FOREGROUND \ No newline at end of file