add sudo for sym run
This commit is contained in:
@@ -379,7 +379,7 @@ class License
|
||||
# check_sym_proc_str = check_sym_proc_str.split("\n")
|
||||
# sym_install_status = check_sym_proc_str[0].split(": ")
|
||||
|
||||
check_sym_proc_str = `#{"service SymmetricDS status"}`
|
||||
check_sym_proc_str = `#{"sudo service SymmetricDS status"}`
|
||||
|
||||
# Check Sym Installed
|
||||
# if sym_install_status[1] == "false"
|
||||
@@ -390,15 +390,15 @@ class License
|
||||
sym_run_status = check_sym_running(check_sym_proc_str, sym_path)
|
||||
if sym_run_status
|
||||
# Create Sym Table
|
||||
check_sym_table = system(sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
check_sym_table = system("sudo " + sym_path + "bin/symadmin --engine sx create-sym-tables")
|
||||
if check_sym_table
|
||||
sym_sql = Rails.root + "db/sym_master.sql"
|
||||
|
||||
if File.exist? (sym_sql)
|
||||
# Import Sym Sql to db and start sym
|
||||
run_sym_sql = system(sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("service SymmetricDS stop")
|
||||
run_sym = system("service SymmetricDS start")
|
||||
run_sym_sql = system("sudo " + sym_path + "bin/dbimport --engine sx " + sym_sql.to_s)
|
||||
stop_sym = system("sudo service SymmetricDS stop")
|
||||
run_sym = system("sudo service SymmetricDS start")
|
||||
if run_sym
|
||||
response = { "status": true, "message": "Activation is success and Configuration done..."}
|
||||
end
|
||||
|
||||
Reference in New Issue
Block a user