8
8
9
9
def start (args ):
10
10
setup_util .replace_text ("php-symfony2/app/config/parameters.yml" , "database_host: .*" , "database_host: " + args .database_host )
11
- setup_util .replace_text ("php-symfony2/deploy/php-symfony2" , "\" .*\/FrameworkBenchmarks" , "\" " + home + "/FrameworkBenchmarks" )
12
- setup_util .replace_text ("php-symfony2/deploy/php-symfony2" , "Directory .*\/FrameworkBenchmarks" , "Directory " + home + "/FrameworkBenchmarks" )
13
11
setup_util .replace_text ("php-symfony2/deploy/nginx.conf" , "root .*\/FrameworkBenchmarks" , "root " + home + "/FrameworkBenchmarks" )
14
12
15
13
try :
16
- #subprocess.check_call("sudo cp cake/deploy/cake /etc/apache2/sites-available/", shell=True)
17
- #subprocess.check_call("sudo a2ensite cake", shell=True)
18
- #subprocess.check_call("sudo chown -R www-data:www-data cake", shell=True)
19
- #subprocess.check_call("sudo /etc/init.d/apache2 start", shell=True)
20
- subprocess .check_call ("composer install" , shell = True )
14
+ subprocess .check_call ("composer.phar install" , shell = True , cwd = "php-symfony2" )
15
+ subprocess .check_call ("sudo chown -R www-data:www-data php-symfony2" , shell = True )
21
16
subprocess .check_call ("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid" , shell = True )
22
17
subprocess .check_call ("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf" , shell = True )
23
18
return 0
@@ -27,9 +22,7 @@ def stop():
27
22
try :
28
23
subprocess .call ("sudo /usr/local/nginx/sbin/nginx -s stop" , shell = True )
29
24
subprocess .call ("sudo kill -QUIT $( cat php-symfony2/deploy/php-fpm.pid )" , shell = True )
30
- #subprocess.check_call("sudo a2dissite cake", shell=True)
31
- #subprocess.check_call("sudo /etc/init.d/apache2 stop", shell=True)
32
- #subprocess.check_call("sudo chown -R $USER:$USER cake", shell=True)
25
+ subprocess .check_call ("sudo chown -R $USER:$USER php-symfony2" , shell = True )
33
26
return 0
34
27
except subprocess .CalledProcessError :
35
28
return 1
0 commit comments