From 2601deae8b2f9416d95b6d601dc4ab4aa3fb1c06 Mon Sep 17 00:00:00 2001 From: ai-dev Date: Mon, 2 Sep 2024 23:17:37 +0200 Subject: [PATCH] update --- dolideb/rootfs/etc/services.d/dolideb/run | 14 ++++++++------ 1 file changed, 8 insertions(+), 6 deletions(-) diff --git a/dolideb/rootfs/etc/services.d/dolideb/run b/dolideb/rootfs/etc/services.d/dolideb/run index 55153e2..128b85c 100644 --- a/dolideb/rootfs/etc/services.d/dolideb/run +++ b/dolideb/rootfs/etc/services.d/dolideb/run @@ -1,13 +1,15 @@ #!/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 +# Ensure the /share/smaf/documents directory exists +mkdir -p /share/smaf/documents + +# Remove the existing /var/www/documents directory if it exists +if [ -d /var/www/documents ]; then + rm -rf /var/www/documents 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 +# Create a symbolic link from /var/www/documents to /share/smaf/documents +ln -s /share/smaf/documents /var/www/documents /usr/sbin/apachectl -D FOREGROUND \ No newline at end of file