1
|
#!/bin/sh
|
2
|
|
3
|
###### Common to all sites
|
4
|
drush -yq en piwik
|
5
|
drush -yq vset piwik_url_http "http://piwik.centrale-marseille.fr/"
|
6
|
drush -yq vset piwik_url_https "https://piwik.centrale-marseille.fr/"
|
7
|
# Piwik cache.
|
8
|
drush -yq vset piwik_cache 1
|
9
|
drush -yq vset piwik_visibility_roles "1"
|
10
|
# Piwik is enable for everyone except the administrator
|
11
|
drush -yq vset --format=json piwik_roles '[3]'
|
12
|
drush -yq vset piwik_page_title_hierarchy 1
|
13
|
# Activate local search.
|
14
|
drush -yq vset piwik_site_search 1
|
15
|
|
16
|
##### Specific
|
17
|
# Note: you can read the piwik site id from the url in piwik
|
18
|
case $1 in
|
19
|
accueil)
|
20
|
piwik_id=286
|
21
|
;;
|
22
|
agora)
|
23
|
piwik_id=116
|
24
|
;;
|
25
|
bda)
|
26
|
piwik_id=273
|
27
|
;;
|
28
|
bde)
|
29
|
piwik_id=274
|
30
|
;;
|
31
|
bds)
|
32
|
piwik_id=275
|
33
|
;;
|
34
|
cac13)
|
35
|
piwik_id=276
|
36
|
;;
|
37
|
cheer-up)
|
38
|
piwik_id=277
|
39
|
;;
|
40
|
clubfinance)
|
41
|
piwik_id=278
|
42
|
;;
|
43
|
clubrobot)
|
44
|
piwik_id=279
|
45
|
;;
|
46
|
echangesphoceens)
|
47
|
piwik_id=280
|
48
|
;;
|
49
|
eluseleves)
|
50
|
piwik_id=281
|
51
|
;;
|
52
|
ercm)
|
53
|
piwik_id=282
|
54
|
;;
|
55
|
fablab)
|
56
|
piwik_id=151
|
57
|
;;
|
58
|
forumentreprises)
|
59
|
piwik_id=270
|
60
|
;;
|
61
|
ginfo)
|
62
|
piwik_id=283
|
63
|
;;
|
64
|
icm)
|
65
|
piwik_id=284
|
66
|
;;
|
67
|
isf)
|
68
|
piwik_id=285
|
69
|
;;
|
70
|
ksi)
|
71
|
piwik_id=209
|
72
|
;;
|
73
|
mdv)
|
74
|
piwik_id=99
|
75
|
;;
|
76
|
tvp)
|
77
|
piwik_id=110
|
78
|
;;
|
79
|
*)
|
80
|
piwik_id=287
|
81
|
;;
|
82
|
esac
|
83
|
|
84
|
# Default is an exception and cannot be treated in the case
|
85
|
if echo $1 | grep default ; then
|
86
|
piwik_id=101
|
87
|
fi
|
88
|
|
89
|
drush -yq vset piwik_site_id $piwik_id
|