| Index: modules/discourse/files/init-discourse | 
| =================================================================== | 
| deleted file mode 100644 | 
| --- a/modules/discourse/files/init-discourse | 
| +++ /dev/null | 
| @@ -1,33 +0,0 @@ | 
| -#!/usr/bin/env python | 
| - | 
| -import sys, os, pwd, subprocess | 
| - | 
| -app_dir = '/opt/discourse' | 
| - | 
| -# HOME environment variable isn't reliable when called via sudo | 
| -home_dir = os.path.expanduser('~' + pwd.getpwuid(os.getuid()).pw_name) | 
| - | 
| -env = dict(os.environ) | 
| -env['RAILS_ENV'] = 'production' | 
| - | 
| -# See http://meta.discourse.org/t/tuning-ruby-and-rails-for-discourse/4126 | 
| -env['RUBY_GC_MALLOC_LIMIT'] = '90000000' | 
| - | 
| -def callRailsCommand(command): | 
| -  subprocess.check_call(command, env=env, cwd=app_dir) | 
| - | 
| -def runInitCommands(): | 
| -  service_path = '/etc/init.d/discourse' | 
| - | 
| -  callRailsCommand(['bundle', 'install', '--deployment', '--without', 'test', '--without', 'development']) | 
| -  callRailsCommand(['bundle', 'exec', 'rake', 'db:migrate']) | 
| -  callRailsCommand(['bundle', 'exec', 'rake', 'assets:precompile']) | 
| - | 
| -  if os.path.exists(service_path): | 
| -    subprocess.check_call(['sudo', service_path, 'stop']) | 
| - | 
| -  if os.path.exists(service_path): | 
| -    subprocess.check_call(['sudo', service_path, 'start']) | 
| - | 
| -if __name__ == '__main__': | 
| -  runInitCommands() | 
|  |