3
3
4
4
case $1 in
5
5
apache2 )
6
- supervisorctl stop nginx
7
- supervisorctl stop php5-fpm
6
+ /etc/init.d/nginx stop
7
+ /etc/init.d/ php5-fpm stop
8
8
9
9
drush @local_bcl -y dis memcache
10
- supervisorctl stop memcached
10
+ /etc/init.d/memcached stop
11
11
for file in $( ls /var/www/bcl* /sites/default/settings.php)
12
12
do
13
13
sed -i $file -e " /comment memcache config/ d"
@@ -16,33 +16,31 @@ case $1 in
16
16
-e " /'memcache_key_prefix'/a comment memcache config */"
17
17
done
18
18
19
- mv /etc/supervisor/conf.d/nginx.conf{,.disabled}
20
- mv /etc/supervisor/conf.d/php5-fpm.conf{,.disabled}
21
- mv /etc/supervisor/conf.d/memcached.conf{,.disabled}
22
- mv /etc/supervisor/conf.d/apache2.conf{.disabled,}
23
- supervisorctl reload
19
+ update-rc.d nginx disable
20
+ update-rc.d php5-fpm disable
21
+ update-rc.d memcached disable
24
22
25
- supervisorctl start apache2
23
+ update-rc.d apache2 enable
24
+ /etc/init.d/apache2 start
26
25
;;
27
26
28
27
nginx )
29
- supervisorctl stop apache2
28
+ /etc/init.d/apache2 stop
30
29
31
- mv /etc/supervisor/conf.d/apache2.conf{,.disabled}
32
- mv /etc/supervisor/conf.d/nginx.conf{.disabled,}
33
- mv /etc/supervisor/conf.d/php5-fpm.conf{.disabled,}
34
- mv /etc/supervisor/conf.d/memcached.conf{.disabled,}
35
- supervisorctl reload
30
+ update-rc.d apache2 disable
31
+ update-rc.d nginx enable
32
+ update-rc.d php5-fpm enable
33
+ update-rc.d memcached enable
36
34
37
35
for file in $( ls /var/www/bcl* /sites/default/settings.php)
38
36
do
39
37
sed -i $file -e " /comment memcache config/ d"
40
38
done
41
- supervisorctl start memcached
39
+ /etc/init.d/memcached start
42
40
drush @local_bcl -y en memcache
43
41
44
- supervisorctl start php5-fpm
45
- supervisorctl start nginx
42
+ /etc/init.d/ php5-fpm start
43
+ /etc/init.d/nginx start
46
44
;;
47
45
* )
48
46
echo " * Usage: $0 {apache2 | nginx}"
0 commit comments