Projet

Général

Profil

Paste
Télécharger (855 octets) Statistiques
| Branche: | Révision:

root / bin / d7-all-reset-piwik-variables.sh @ 8c5e4549

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
if [ $1 = forumentreprises ] ; then
19
    piwik_id=270
20
elif [ $1 = fablab ] ; then
21
    piwik_id=151
22
elif [ $1 = agora ] ; then
23
    piwik_id=116
24
elif [ $1 = mdv ] ; then
25
    piwik_id=99
26
elif [ $1 = tvp ] ; then
27
    piwik_id=110
28
else
29
    piwik_id=101
30
fi
31

    
32
drush -yq vset piwik_site_id $piwik_id