From 1f979f9d8e4ea27777ef15638e09c80453fb7a5f Mon Sep 17 00:00:00 2001 From: Francesco Montanari Date: Mon, 11 Nov 2019 22:51:56 +0200 Subject: [PATCH] Clear the roundcube temp_dir if upgrading from 1.3.x --- setup/webmail.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/setup/webmail.sh b/setup/webmail.sh index 11642892..b7fa3510 100755 --- a/setup/webmail.sh +++ b/setup/webmail.sh @@ -51,6 +51,11 @@ elif [[ "$UPDATE_KEY" != `cat /usr/local/lib/roundcubemail/version` ]]; then needs_update=1 #NODOC fi if [ $needs_update == 1 ]; then + # if upgrading from 1.3.x, clear the temp_dir + if [ "$(cat /usr/local/lib/roundcubemail/version | cut -c1-3)" == '1.3' ]; then + find /var/tmp/roundcubemail/ -type f ! -name 'RCMTEMP*' -delete + fi + # install roundcube wget_verify \ https://github.com/roundcube/roundcubemail/releases/download/$VERSION/roundcubemail-$VERSION-complete.tar.gz \