You've already forked postfixadmin
mirror of
https://github.com/postfixadmin/postfixadmin.git
synced 2025-08-07 17:42:53 +03:00
try and improve setup of the templates_c directory for debian
This commit is contained in:
13
debian/postfixadmin.postinst
vendored
13
debian/postfixadmin.postinst
vendored
@@ -19,16 +19,25 @@ if [ "$(readlink /etc/lighttpd/conf-available/postfixadmin)" = "../../postfixadm
|
||||
rm -f /etc/lighttpd/conf-available/postfixadmin
|
||||
fi
|
||||
|
||||
# Try and avoid templates_c being in /usr/share/postfixadmin and ensure it's writeable by the webserver
|
||||
if [ ! -d /var/cache/postfixadmin ]; then
|
||||
mkdir -p /var/cache/postfixadmin
|
||||
chown www-data:root /var/cache/postfixadmin
|
||||
chmod 700 /var/cache/postfixadmin
|
||||
ln -s /var/cache/postfixadmin /usr/share/postfixadmin/templates_c
|
||||
fi
|
||||
|
||||
# See : https://sourceforge.net/p/postfixadmin/bugs/376/ - remove any existing templates_c files on upgrade.
|
||||
if [ -d /usr/share/postfixadmin/templates_c ]; then
|
||||
find /usr/share/postfixadmin/templates_c -type f -exec rm -r {} \;
|
||||
find /usr/share/postfixadmin/templates_c -type f -delete
|
||||
fi
|
||||
|
||||
if [ -d /usr/share/postfixadmin/templates_c ]; then
|
||||
chown www-data /usr/share/postfixadmin/templates_c
|
||||
fi
|
||||
|
||||
if [ -d /var/cache/postfixadmin ]; then
|
||||
find /var/cache/postfixadmin -type f -exec rm -r {} \;
|
||||
find /var/cache/postfixadmin -type f -delete
|
||||
chown www-data /var/cache/postfixadmin
|
||||
fi
|
||||
|
||||
|
Reference in New Issue
Block a user