aboutsummaryrefslogtreecommitdiff
path: root/piwik-dl
blob: 3bdc1de5ab45d481ec34e3bbdfec31d060f32369 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
#!/bin/bash
#
# Piwik simple upgrader.
#

# Parameters
KEY="814E346FA01A20DBB04B6807B5DBD5925590A237"

# See http://piwik.org/blog/2014/11/verify-signatures-piwik-packages/
if ! gpg --list-keys "$KEY" &> /dev/null; then
  gpg --keyserver keys.gnupg.net --recv-keys "$KEY" || exit 1
fi

# Upgrade procedure
wget http://piwik.org/latest.zip && \
wget http://piwik.org/latest.zip.asc && \
gpg --verify latest.zip.asc latest.zip && \
mv piwik/ piwik.old && \
unzip latest.zip && \
rm *html && \
rm latest.zip && \
cp -a piwik.old/config/config.ini.php piwik/config/ && \
chown -R stats.stats piwik/{config,tmp} && \
echo "Audit:" && \
du -hs piwik && \
du -hs piwik.old