-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathupdate-multisite.sh
executable file
·49 lines (49 loc) · 1.41 KB
/
update-multisite.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
#!/bin/bash
echo Multisite Maintenance script
PS3='what do you want to do: '
options=("Display site status"
"Display sistem site info"
"Check updates of ROOT SITE"
"Update modules of ROOT SITE"
"Check updates of core only ROOT SITE"
"Show multisite information"
"Update Database of any site"
"Clear cache of any site"
"Quit")
select opt in "${options[@]}"
do
case $opt in
"Display site status")
vendor/bin/drupal site:status
;;
"Display sistem site info")
vendor/bin/drupal debug:config system.site
;;
"Check updates of ROOT SITE")
composer outdated
;;
"Update modules of ROOT SITE")
composer updated
;;
"Check updates of core only ROOT SITE")
composer outdated drupal/*
;;
"Show multisite information")
vendor/bin/drupal debug:multisite
;;
"Update Database of any site")
echo Insert site name
read sitename
vendor/bin/drupal --uri=$sitename update:execute
;;
"Clear cache of any site")
echo Insert site name
read sitename
vendor/bin/drupal --uri=$sitename cr
;;
"Quit")
break
;;
*) echo "invalid option $REPLY";;
esac
done