Generate the correct path in the sql config

ryzomclassic-develop
kaetemi 3 years ago
parent 23b188cadc
commit 6f2cd1fa1b
No known key found for this signature in database
GPG Key ID: 9873C4D40BB479BC

@ -1,6 +1,8 @@
import socket import socket, os
hostname = socket.gethostname() hostname = socket.gethostname()
root = os.getenv('RC_ROOT').replace('\\', '/')
shardDev = root + '/pipeline/shard_dev'
with open("web_config.sql", "r") as fr: with open("web_config.sql", "r") as fr:
with open("web_config_local.sql", "w") as fw: with open("web_config_local.sql", "w") as fw:
for l in fr: for l in fr:
fw.write(l.replace("%RC_HOSTNAME%", hostname)) fw.write(l.replace("%RC_HOSTNAME%", hostname).replace("%RC_SHARD_DEV%", shardDev))

@ -5,7 +5,7 @@ INSERT INTO `domain` (`domain_id`, `domain_name`, `status`, `patch_version`, `ba
-- Add the domain to the NeL Admin Tool database -- Add the domain to the NeL Admin Tool database
USE `nel_tool`; USE `nel_tool`;
INSERT INTO `neltool_domains` (`domain_id`, `domain_name`, `domain_as_host`, `domain_as_port`, `domain_rrd_path`, `domain_las_admin_path`, `domain_las_local_path`, `domain_application`, `domain_sql_string`, `domain_hd_check`, `domain_mfs_web`, `domain_cs_sql_string`) VALUES ('90', 'dev', '%RC_HOSTNAME%', '46999', '%RC_SHARD_DEV%\\rrd_graphs', '', '', 'dev', 'mysql://root@%RC_HOSTNAME%:9040/ring_dev', '0', NULL, NULL); INSERT INTO `neltool_domains` (`domain_id`, `domain_name`, `domain_as_host`, `domain_as_port`, `domain_rrd_path`, `domain_las_admin_path`, `domain_las_local_path`, `domain_application`, `domain_sql_string`, `domain_hd_check`, `domain_mfs_web`, `domain_cs_sql_string`) VALUES ('90', 'dev', '%RC_HOSTNAME%', '46999', '%RC_SHARD_DEV%/rrd_graphs', '', '', 'dev', 'mysql://root@%RC_HOSTNAME%:9040/ring_dev', '0', NULL, NULL);
-- Add the mainland shard to the NeL database -- Add the mainland shard to the NeL database
use `nel`; use `nel`;

Loading…
Cancel
Save