This commit is contained in:
ai-dev 2024-09-02 23:17:37 +02:00
parent c514c0cbb1
commit 2601deae8b

View File

@ -1,13 +1,15 @@
#!/usr/bin/execlineb -P #!/usr/bin/execlineb -P
with-contenv with-contenv
# Change the document root path in the Dolibarr configuration files # Ensure the /share/smaf/documents directory exists
if [ -f /var/www/htdocs/conf/conf.php ]; then mkdir -p /share/smaf/documents
sed -i "s|/var/www/documents|/share/smaf/documents|g" /var/www/htdocs/conf/conf.php
# Remove the existing /var/www/documents directory if it exists
if [ -d /var/www/documents ]; then
rm -rf /var/www/documents
fi fi
if [ -f /var/www/html/conf/conf.php ]; then # Create a symbolic link from /var/www/documents to /share/smaf/documents
sed -i "s|/var/www/documents|/share/smaf/documents|g" /var/www/html/conf/conf.php ln -s /share/smaf/documents /var/www/documents
fi
/usr/sbin/apachectl -D FOREGROUND /usr/sbin/apachectl -D FOREGROUND