From 72c39f618d24a0217bb83c514b9f3e748371ff94 Mon Sep 17 00:00:00 2001 From: onefang Date: Thu, 9 Sep 2021 14:42:02 +1000 Subject: Convert old config.ini path variables to new shini. --- src/sledjchisl/sledjchisl.c | 13 +++++++++++++ 1 file changed, 13 insertions(+) diff --git a/src/sledjchisl/sledjchisl.c b/src/sledjchisl/sledjchisl.c index 3e21d10..3d4f685 100644 --- a/src/sledjchisl/sledjchisl.c +++ b/src/sledjchisl/sledjchisl.c @@ -8804,6 +8804,19 @@ Create the /opt/opensim-SC directory structure. // Not sure if we need to worry about it just yet. // TODO - this leaks memory, but it's a bug in qLibc. Send the bug fix upstream. snprintf(toybuf, sizeof(toybuf), "%s/config/config.ini", scRoot); + V("Reading %s and connecting to database.", toybuf); + + char *cmd = xmprintf("sed -i -E" + " -e 's$BackupPath = \"../../backups\"$BackupPath = \"../../var/backups\"$'" + " -e 's$CachePath = \"../../caches\"$CachePath = \"../../var/cache\"$'" + " -e 's$DbPath = \"../../db\"$DbPath = \"../../var/lib/db\"$'" + " -e 's$LogPath = \"../../logs\"$LogPath = \"../../var/log\"$'" + " -e 's$WebPath = \"../../web\"$PIDPath = \"../../var/run\"\\n WebPath = \"../../var/run/www/html\"$'" + " %s", toybuf); + + if (shellMeFail(cmd)) + E("sed command failed!"); + qlisttbl_t *qconfig = qconfig_parse_file(NULL, toybuf, '='); if (NULL == qconfig) { -- cgit v1.1