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