Projet

Général

Profil

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

root / bin / d7-reset-piwik-variables.sh @ 6c38d829

1 10166730 Julien Enselme
#!/bin/sh
2
3
###### Common to all sites
4 8c5e4549 Julien Enselme
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 10166730 Julien Enselme
# Piwik cache.
8 8c5e4549 Julien Enselme
drush -yq vset piwik_cache 1
9
drush -yq vset piwik_visibility_roles "1"
10 10166730 Julien Enselme
# Piwik is enable for everyone except the administrator
11 8c5e4549 Julien Enselme
drush -yq vset --format=json piwik_roles '[3]'
12
drush -yq vset piwik_page_title_hierarchy 1
13 10166730 Julien Enselme
# Activate local search.
14 8c5e4549 Julien Enselme
drush -yq vset piwik_site_search 1
15 10166730 Julien Enselme
16
##### Specific
17
# Note: you can read the piwik site id from the url in piwik
18 3b677135 Julien Enselme
case $1 in
19 19075841 Florent Torregrosa
    accueil)
20 c789b019 Julien Enselme
	piwik_id=286
21
	;;
22 3b677135 Julien Enselme
    agora)
23 c789b019 Julien Enselme
	piwik_id=116
24
	;;
25 3b677135 Julien Enselme
    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 c789b019 Julien Enselme
    fablab)
56
	piwik_id=151
57
	;;
58 19075841 Florent Torregrosa
    forumentreprises)
59 c789b019 Julien Enselme
	piwik_id=270
60
	;;
61 3b677135 Julien Enselme
    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 c789b019 Julien Enselme
    mdv)
74
	piwik_id=99
75
	;;
76 19075841 Florent Torregrosa
    tvp)
77 c789b019 Julien Enselme
	piwik_id=110
78
	;;
79 059a6f1e Florent Torregrosa
	ftorregrosa)
80
    piwik_id=314
81
    ;;
82 3b677135 Julien Enselme
    *)
83
	piwik_id=287
84
	;;
85
esac
86
87
# Default is an exception and cannot be treated in the case
88
if echo $1 | grep default ; then
89 10166730 Julien Enselme
    piwik_id=101
90
fi
91
92 8c5e4549 Julien Enselme
drush -yq vset piwik_site_id $piwik_id