Project

General

Profile

Paste
Download (1.4 KB) Statistics
| Branch: | Revision:

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

1
#!/bin/sh
2

    
3
site="$1"
4

    
5
###### Common to all sites
6
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
# Piwik cache.
10
drush @"${site}" -yq vset piwik_cache 1
11
drush @"${site}" -yq vset piwik_visibility_roles "1"
12
# Piwik is enable for everyone except the administrator
13
drush @"${site}" -yq vset --format=json piwik_roles '[3]'
14
drush @"${site}" -yq vset piwik_page_title_hierarchy 1
15
# Activate local search.
16
drush @"${site}" -yq vset piwik_site_search 1
17

    
18
##### Specific
19
# Note: you can read the piwik site id from the url in piwik
20
case "$1" in
21
    accueil)
22
	piwik_id=286
23
	;;
24
    agora)
25
	piwik_id=116
26
	;;
27
    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
    fablab)
58
	piwik_id=151
59
	;;
60
    forumentreprises)
61
	piwik_id=270
62
	;;
63
    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
    mdv)
76
	piwik_id=99
77
	;;
78
    tvp)
79
	piwik_id=110
80
	;;
81
    ftorregrosa)
82
	piwik_id=314
83
	;;
84
    default)
85
	piwik_id=101
86
	;;
87
    *)
88
	piwik_id=287
89
	;;
90
esac
91

    
92
drush @"${site}" -yq vset piwik_site_id "${piwik_id}"