blob: 6820cc1ff3dd217c20576dbe7af98181caae330f (
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
27
|
#!/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 https://builds.piwik.org/latest.zip && \
wget https://builds.piwik.org/latest.zip.asc && \
gpg --verify latest.zip.asc latest.zip && \
mv piwik/ piwik.old && \
unzip latest.zip && \
rm *html && \
rm latest.zip* && \
( cd piwik && mkdir -p config tmp ) && \
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
|