@@ -0,0 +1,2037 @@
+%0Aimport subprocess%0Aimport sys%0Aimport setup_util%0Aimport os%0Afrom os.path import expanduser%0A%0Ahome = expanduser(%22~%22)%0A%0Adef start(args):%0A  setup_util.replace_text(%22php-fatfree/index.php%22, %22host=.*;%22, %22host=%22 + args.database_host + %22;%22)%0A  setup_util.replace_text(%22php-fatfree/deploy/php%22, %22%5C%22.*%5C/FrameworkBenchmarks%22, %22%5C%22%22 + home + %22/FrameworkBenchmarks%22)%0A  setup_util.replace_text(%22php-fatfree/deploy/php%22, %22Directory .*%5C/FrameworkBenchmarks%22, %22Directory %22 + home + %22/FrameworkBenchmarks%22)%0A  setup_util.replace_text(%22php-fatfree/deploy/nginx.conf%22, %22root .*%5C/FrameworkBenchmarks%22, %22root %22 + home + %22/FrameworkBenchmarks%22)%0A  %0A  try:%0A    if os.name == 'nt':%0A      subprocess.check_call('appcmd add site /name:PHP /bindings:http/*:8080: /physicalPath:%22C:%5C%5CFrameworkBenchmarks%5C%5Cphp-fatfree%22', shell=True)%0A      return 0%0A    %0A    #subprocess.check_call(%22sudo cp php-fatfree/deploy/php /etc/apache2/sites-available/%22, shell=True)%0A    #subprocess.check_call(%22sudo a2ensite php%22, shell=True)%0A    #subprocess.check_call(%22sudo /etc/init.d/apache2 start%22, shell=True)%0A    %0A    subprocess.check_call(%22sudo chown -R www-data:www-data php-fatfree%22, shell=True)%0A    subprocess.check_call(%22sudo chmod -R www-data:www-data php-fatfree%22, shell=True)%0A    subprocess.check_call(%22sudo php-fpm --fpm-config config/php-fpm.conf -g %22 + home + %22/FrameworkBenchmarks/php-fatfree/deploy/php-fpm.pid%22, shell=True)%0A    subprocess.check_call(%22sudo /usr/local/nginx/sbin/nginx -c %22 + home + %22/FrameworkBenchmarks/php-fatfree/deploy/nginx.conf%22, shell=True)%0A    %0A    return 0%0A  except subprocess.CalledProcessError:%0A    return 1%0Adef stop():%0A  try:%0A    if os.name == 'nt':%0A      subprocess.check_call('appcmd delete site PHP', shell=True)%0A      return 0%0A    %0A    subprocess.call(%22sudo /usr/local/nginx/sbin/nginx -s stop%22, shell=True)%0A    subprocess.call(%22sudo kill -QUIT $( cat php-fatfree/deploy/php-fpm.pid )%22, shell=True)%0A    subprocess.check_call(%22sudo chown -R $USER:$USER php-fatfree%22, shell=True)%0A    %0A    return 0%0A  except subprocess.CalledProcessError:%0A    return 1%0A

add setup file