license acti
This commit is contained in:
@@ -204,7 +204,7 @@ class License
|
|||||||
f.write("initial.load.create.first=true\n")
|
f.write("initial.load.create.first=true\n")
|
||||||
f.write("initial.load.use.extract.job.enabled=true\n")
|
f.write("initial.load.use.extract.job.enabled=true\n")
|
||||||
f.close
|
f.close
|
||||||
byebug
|
|
||||||
# read from license file
|
# read from license file
|
||||||
shop_name = read_license("shop_name")
|
shop_name = read_license("shop_name")
|
||||||
dbhost = read_license("dbhost")
|
dbhost = read_license("dbhost")
|
||||||
@@ -213,7 +213,7 @@ byebug
|
|||||||
dbpassword = read_license("dbpassword")
|
dbpassword = read_license("dbpassword")
|
||||||
|
|
||||||
# shop properties create
|
# shop properties create
|
||||||
f = File.open(sym_location + "/#{shop_name}.properties", "w")
|
f = File.open(sym_location + "engines/#{shop_name}.properties", "w")
|
||||||
f.write("engine.name=#{shop_name}\n")
|
f.write("engine.name=#{shop_name}\n")
|
||||||
f.write("db.driver=com.mysql.jdbc.Driver\n")
|
f.write("db.driver=com.mysql.jdbc.Driver\n")
|
||||||
f.write("db.url=jdbc:mysql://#{dbhost}/#{dbschema}?tinyInt1isBit=false\n")
|
f.write("db.url=jdbc:mysql://#{dbhost}/#{dbschema}?tinyInt1isBit=false\n")
|
||||||
@@ -247,7 +247,7 @@ byebug
|
|||||||
# if sym_install_status[1] == "false"
|
# if sym_install_status[1] == "false"
|
||||||
# response = { "status": false, "message": "Activation is success but Symmetric service not Installed. \n Please contact code2lab call center!"}
|
# response = { "status": false, "message": "Activation is success but Symmetric service not Installed. \n Please contact code2lab call center!"}
|
||||||
# end
|
# end
|
||||||
byebug
|
|
||||||
# Run Sym Service
|
# Run Sym Service
|
||||||
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
|
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
|
||||||
if sym_run_status
|
if sym_run_status
|
||||||
@@ -255,19 +255,22 @@ byebug
|
|||||||
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
|
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||||
if check_sym_table
|
if check_sym_table
|
||||||
sym_sql = Rails.root + "db/sym_master.sql"
|
sym_sql = Rails.root + "db/sym_master.sql"
|
||||||
|
|
||||||
if File.exist? (sym_sql)
|
if File.exist? (sym_sql)
|
||||||
# Import Sym Sql to db and start sym
|
# Import Sym Sql to db and start sym
|
||||||
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql)
|
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||||
run_sym = system(sym_path + "bin/sym")
|
stop_sym = system("service SymmetricDS stop")
|
||||||
|
run_sym = system("service SymmetricDS start")
|
||||||
if run_sym
|
if run_sym
|
||||||
response = { "status": true, "message": "Activation is success and Configuration done..."}
|
response = { "status": true, "message": "Activation is success and Configuration done..."}
|
||||||
end
|
end
|
||||||
else
|
else
|
||||||
response = { "status": false, "message": "Activation is success but Symmetric Sql not Found. \n Please contact code2lab call center!"}
|
response = { "status": false, "message": "Activation is success but Symmetric Sql not found. \n Please contact code2lab call center!"}
|
||||||
end
|
end
|
||||||
end
|
end
|
||||||
end
|
else
|
||||||
|
response = { "status": false, "message": "Activation is success but Symmetric not running. \n Please contact code2lab call center!"}
|
||||||
|
end
|
||||||
end
|
end
|
||||||
|
|
||||||
# Check Symmetric Running
|
# Check Symmetric Running
|
||||||
|
|||||||
@@ -1,12 +1,12 @@
|
|||||||
iv_key: E0/gk/s6POeZtUae1QGo8g==
|
iv_key: bcXKbfOW+r64ibYXA4fU6g==
|
||||||
shop_name: R6s4J457+8FD1pycH5vl9g==
|
shop_name: Riz05xEt2Pc/tvyGjcnTnw==
|
||||||
email: yanaung.nyein@code2lab.com
|
email: yanaung.nyein@code2lab.com
|
||||||
telephone: 111111
|
telephone: 111111
|
||||||
fax: 111111
|
fax: 111111
|
||||||
address: bitp
|
address: bitp
|
||||||
dbhost: A5OOsy/OEnIoMiqHNgrl8A==
|
dbhost: SMRuRTn59zAHEEdafri+Dg==
|
||||||
dbschema: YfkMWJWhzPwt8GDFukk3dA==
|
dbschema: iV7J64u6z9rqg5OFhf3OSw==
|
||||||
dbusername: wcWA1CIUTq5NNIqmdAW79A==
|
dbusername: gPg1PsWxrLNr/JXsmAch0A==
|
||||||
dbpassword: I6t1lEqagOTQe1u87YPJJA==
|
dbpassword: Xdq1p/jiewvgdG6LBAtRpw==
|
||||||
api_token: nGyMizHtoVEFYCjSVEFJuzkxuBJwSsH
|
api_token: nGyMizHtoVEFYCjSVEFJuzkxuBJwSsH
|
||||||
app_token: QUdPwSakcsnuVLdfkXgGHhPMiIOcSSfaVwQyA
|
app_token: QUdPwSakcsnuVLdfkXgGHhPMiIOcSSfaVwQyA
|
||||||
|
|||||||
Reference in New Issue
Block a user