Skip to content

Commit 3afe5fe

Browse files
author
Kristan Kenney
committed
Fixes to z-push upgrade/install routine
1 parent b9844a2 commit 3afe5fe

File tree

1 file changed

+12
-2
lines changed

1 file changed

+12
-2
lines changed

install/upgrade/0.9.8-29.sh

Lines changed: 12 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -107,12 +107,22 @@ if [ ! -z "$MAIL_SYSTEM" ]; then
107107
apt-get -qq -y install z-push-common z-push-backend-imap z-push-backend-combined z-push-autodiscover > /dev/null 2>&1
108108

109109
# Copy configuration files
110+
if [ -z /etc/z-push/ ]; then
111+
echo "(I) Adding Z-Push configuration directory"
112+
mkdir -p /etc/z-push/
113+
fi
110114
cp -f $hestiacp/zpush/z-push.conf.php /etc/z-push/
111115
cp -f $hestiacp/zpush/imap.conf.php /etc/z-push/
112116

113117
# Set permissions - chmod 777 needs further testing!
114-
set_perms www-data www-data 777 /var/lib/z-push
115-
set_perms www-data www-data 777 /var/log/z-push
118+
if [ -z /var/log/z-push ]; then
119+
echo "(I) Adding Z-Push logs directory"
120+
mkdir -p /var/log/z-push
121+
fi
122+
chmod 777 /var/lib/z-push
123+
chown -R www-data:www-data /var/lib/z-push
124+
chmod 777 /var/log/z-push
125+
chown -R www-data:www-data /var/log/z-push
116126
fi
117127

118128
# Update default page templates

0 commit comments

Comments
 (0)