Projet

Général

Profil

Paste
Télécharger (1,4 ko) Statistiques
| Branche: | Révision:

root / bin / d7-reset-piwik-variables.sh @ 2cf41c1d

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