Révision 10166730
Ajouté par Julien Enselme il y a plus de 10 ans
bin/d7-all-reset-piwik-variables.sh | ||
---|---|---|
1 |
#!/bin/sh |
|
2 |
|
|
3 |
###### Common to all sites |
|
4 |
drush -y en piwik |
|
5 |
drush -y vset piwik_url_http "http://piwik.centrale-marseille.fr/" |
|
6 |
drush -y vset piwik_url_https "https://piwik.centrale-marseille.fr/" |
|
7 |
# Piwik cache. |
|
8 |
drush -y vset piwik_cache 1 |
|
9 |
drush -y vset piwik_visibility_roles "1" |
|
10 |
# Piwik is enable for everyone except the administrator |
|
11 |
drush -y vset --format=json piwik_roles '[3]' |
|
12 |
drush -y vset piwik_page_title_hierarchy 1 |
|
13 |
# Activate local search. |
|
14 |
drush -y 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 -y vset piwik_site_id $piwik_id |
bin/d7-all-reset-variables.sh | ||
---|---|---|
3 | 3 |
. /users/guest/assos/bin/scripts-config.sh |
4 | 4 |
|
5 | 5 |
for dir in `find $d7_dir_sites -maxdepth 1 -mindepth 1 -type d ! -name all | sort` ; do |
6 |
cd $dir |
|
7 | 6 |
echo $dir |
8 |
d7-reset-variables.sh |
|
7 |
site_name=`echo $dir | tr '.' '\n' | tail -n 1` |
|
8 |
d7-reset-variables.sh $site_name |
|
9 | 9 |
done |
bin/d7-reset-variables.sh | ||
---|---|---|
6 | 6 |
|
7 | 7 |
if [ ! -z $1 ] ; then |
8 | 8 |
. scripts-config-site.sh $1 |
9 |
cd $d7_site_dir |
|
9 |
# default is an exception to the rule |
|
10 |
if echo $dir | grep default > /dev/null ; then |
|
11 |
cd $d7_dir_sites/default |
|
12 |
else |
|
13 |
cd $d7_site_dir |
|
14 |
fi |
|
10 | 15 |
fi |
11 | 16 |
|
12 | 17 |
current_timestamp=`date "+%s"` |
... | ... | |
35 | 40 |
|
36 | 41 |
|
37 | 42 |
####### Piwik |
38 |
drush -y en piwik |
|
39 |
drush -y vset piwik_site_id "101" |
|
40 |
drush -y vset piwik_url_http "http://piwik.centrale-marseille.fr/" |
|
41 |
drush -y vset piwik_url_https "https://piwik.centrale-marseille.fr/" |
|
42 |
# Piwik cache. |
|
43 |
drush -y vset piwik_cache 1 |
|
44 |
drush -y vset piwik_visibility_roles "1" |
|
45 |
# Piwik is enable for everyone except the administrator |
|
46 |
drush -y vset --format=json piwik_roles '[3]' |
|
47 |
drush -y vset piwik_page_title_hierarchy 1 |
|
48 |
# Activate local search. |
|
49 |
drush -y vset piwik_site_search 1 |
|
50 |
|
|
43 |
d7-all-reset-piwik-variables.sh $d7_site_name |
|
51 | 44 |
|
52 | 45 |
###### Security review |
53 | 46 |
# For untrusted roles: |
... | ... | |
63 | 56 |
# file_perms : Security Review can't check for files permissions on multi_assos if launched within the web interface. |
64 | 57 |
# private_files : we have chosen a private path in the files repository and Security Review raise errors but this path is secure. |
65 | 58 |
drush -y sqlq --db-prefix "UPDATE {security_review} SET skip = '1', skiptime = $current_timestamp, skipuid = '1' WHERE reviewcheck IN ('file_perms', 'private_files');" |
66 |
drush -y sqlq --db-prefix "UPDATE {security_review} SET skip = '0', skiptime = '0', skipuid = NULL WHERE reviewcheck NOT IN ('file_perms', 'private_files');" |
|
59 |
drush -y sqlq --db-prefix "UPDATE {security_review} SET skip = '0', skiptime = '0', skipuid = NULL WHERE reviewcheck NOT IN ('file_perms', 'private_files');" |
Formats disponibles : Unified diff
Piwik site id: all sites now get the proper piwik site id