Skip to content

Commit e4d46b7

Browse files
Slightly altered setup script for symfony2
1 parent 5d57203 commit e4d46b7

File tree

3 files changed

+8
-12
lines changed

3 files changed

+8
-12
lines changed

installer.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -103,6 +103,9 @@ def __install_server_software(self):
103103
self.__run_command("sudo cp ../config/php-fpm.conf /usr/local/lib/php-fpm.conf")
104104
self.__run_command("rm php-5.4.13.tar.gz")
105105

106+
# Composer
107+
self.__run_command("curl -sS https://getcomposer.org/installer | php -- --install-dir=bin")
108+
106109
#
107110
# Haskell
108111
#

php-symfony2/benchmark_config

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
"db_url": "/db",
88
"query_url": "/db?queries=",
99
"port": 8080,
10-
"sort": 13
10+
"sort": 51
1111
}
1212
}]
13-
}
13+
}

php-symfony2/setup.py

Lines changed: 3 additions & 10 deletions
Original file line numberDiff line numberDiff line change
@@ -8,16 +8,11 @@
88

99
def start(args):
1010
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")
1311
setup_util.replace_text("php-symfony2/deploy/nginx.conf", "root .*\/FrameworkBenchmarks", "root " + home + "/FrameworkBenchmarks")
1412

1513
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)
2116
subprocess.check_call("sudo php-fpm --fpm-config config/php-fpm.conf -g " + home + "/FrameworkBenchmarks/php-symfony2/deploy/php-fpm.pid", shell=True)
2217
subprocess.check_call("sudo /usr/local/nginx/sbin/nginx -c " + home + "/FrameworkBenchmarks/php-symfony2/deploy/nginx.conf", shell=True)
2318
return 0
@@ -27,9 +22,7 @@ def stop():
2722
try:
2823
subprocess.call("sudo /usr/local/nginx/sbin/nginx -s stop", shell=True)
2924
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)
3326
return 0
3427
except subprocess.CalledProcessError:
3528
return 1

0 commit comments

Comments
 (0)