summaryrefslogtreecommitdiff
path: root/app
diff options
context:
space:
mode:
authorStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-15 19:48:22 +0100
committerStefan Wintermeyer <stefan.wintermeyer@amooma.de>2013-01-15 19:48:22 +0100
commit4fbda07c7b593dcc22b90f571d1b85b1bdc47528 (patch)
treee81eecd2541bc2c37d9dd59031b9ba56080c10e4 /app
parent078e90282bab4b76d6eb0678c9e5f69d7ae86748 (diff)
Check if Rails.env.production? before restarting FreeSWITCH. #101
Diffstat (limited to 'app')
-rw-r--r--app/controllers/gemeinschaft_setups_controller.rb6
1 files changed, 4 insertions, 2 deletions
diff --git a/app/controllers/gemeinschaft_setups_controller.rb b/app/controllers/gemeinschaft_setups_controller.rb
index 89a82cb..dbe8ff5 100644
--- a/app/controllers/gemeinschaft_setups_controller.rb
+++ b/app/controllers/gemeinschaft_setups_controller.rb
@@ -47,8 +47,10 @@ class GemeinschaftSetupsController < ApplicationController
GsParameter.where(:name => 'user_image_url').first.update_attributes(:value => "http://#{@gemeinschaft_setup.sip_domain.host}/uploads/user/image")
# Restart FreeSWITCH
- # require 'freeswitch_event'
- # FreeswitchAPI.execute('fsctl', 'shutdown restart')
+ if Rails.env.production?
+ require 'freeswitch_event'
+ FreeswitchAPI.execute('fsctl', 'shutdown restart')
+ end
# Auto-Login:
session[:user_id] = user.id