Prepare to support ruby 3.3.
This commit is contained in:
parent
2d0d00f8ba
commit
b301e04fac
|
@ -9,7 +9,7 @@ class Admin::BoxController < ApplicationController
|
||||||
|
|
||||||
def index
|
def index
|
||||||
is_not_open = `fuser #{SocketFile}`.gsub(/\n/, '').empty?
|
is_not_open = `fuser #{SocketFile}`.gsub(/\n/, '').empty?
|
||||||
if !File.exists?(SocketFile) || `ss -elx | grep -w "$(stat -c 'ino:%i dev:0/%d' '#{SocketFile}')"`.blank?
|
if !File.exist?(SocketFile) || `ss -elx | grep -w "$(stat -c 'ino:%i dev:0/%d' '#{SocketFile}')"`.blank?
|
||||||
Thread.new do
|
Thread.new do
|
||||||
`#{Binary} --unixdomain-only #{SocketFile}:$USER:$USER:0666 --disable-ssl --debug --css #{CSSFile}`
|
`#{Binary} --unixdomain-only #{SocketFile}:$USER:$USER:0666 --disable-ssl --debug --css #{CSSFile}`
|
||||||
end
|
end
|
||||||
|
|
|
@ -1,6 +1,7 @@
|
||||||
module ClientManagement
|
module ClientManagement
|
||||||
class Engine < ::Rails::Engine
|
class Engine < ::Rails::Engine
|
||||||
initializer "client_management" do
|
initializer "client_management" do
|
||||||
|
Rails.application.config.to_prepare do
|
||||||
OrbitApp.registration "client_management", :type => "ModuleApp" do
|
OrbitApp.registration "client_management", :type => "ModuleApp" do
|
||||||
module_label "client_management.client_management"
|
module_label "client_management.client_management"
|
||||||
base_url File.expand_path File.dirname(__FILE__)
|
base_url File.expand_path File.dirname(__FILE__)
|
||||||
|
@ -9,8 +10,8 @@ module ClientManagement
|
||||||
taggable "SiteServer"
|
taggable "SiteServer"
|
||||||
# frontend_enabled
|
# frontend_enabled
|
||||||
# data_count 1..30
|
# data_count 1..30
|
||||||
require File.expand_path('../../../app/models/server_ability', __FILE__)
|
require File.join(ClientManagement::Engine.root, 'app/models/server_ability')
|
||||||
require File.expand_path('../../../app/models/plow_setting', __FILE__)
|
require File.join(ClientManagement::Engine.root, 'app/models/plow_setting')
|
||||||
if ServerAbility.count==0
|
if ServerAbility.count==0
|
||||||
ServerAbility.create()
|
ServerAbility.create()
|
||||||
end
|
end
|
||||||
|
@ -80,3 +81,4 @@ module ClientManagement
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
|
end
|
||||||
|
|
Loading…
Reference in New Issue