fix last commit

This commit is contained in:
zefie
2022-10-10 13:09:18 -04:00
parent e608a96787
commit 7505494612
4 changed files with 23 additions and 14 deletions

View File

@@ -1,7 +1,7 @@
var minisrv_service_file = true;
var viewer = 2 // debug override
var viewergen_resource_dir = __dirname + "/" + minisrv_config.config.ServiceDeps + "/viewergen/";
var viewergen_resource_dir = ServiceDeps + "/viewergen/";
var viewers = {
0: "WebTVIntel--1.0.exe",

View File

@@ -29,7 +29,7 @@ wtv-client-time-zone: GMT -0000
wtv-client-time-dst-rule: GMT
wtv-client-date: `+ strftime("%a, %d %b %Y %H:%M:%S", new Date(new Date().toUTCString())) + ` GMT`;
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
var file_path = ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
if (file_path) {
request_is_async = true;

View File

@@ -77,22 +77,23 @@ if (session_data.data_store.wtvsec_login) {
case "US-WEBSTAR-disk-0MB-16MB-softmodem-CPU5230":
prereg_contype = "text/tellyscript";
// if wtv-open-access: true then client expects OpenISP
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
else var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" +
+ "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
else var file_path = ServiceDeps+ "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
break;
case "US-DTV-disk-0MB-32MB-softmodem-CPU5230":
if (wtvshared.isMiniBrowser(session_data)) {
prereg_contype = "text/tellyscript";
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
else file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
if (session_data.get("wtv-open-access")) file_path = ServiceDeps+ "/wtv-1800/tellyscripts/LC2/LC2_OpenISP_56k.tok";
else file_path = ServiceDeps+ "/wtv-1800/tellyscripts/LC2/LC2_WTV_18006138199.tok";
} else {
prereg_contype = "text/dialscript";
if (session_data.get("wtv-lan") == "true") {
file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
file_path = ServiceDeps+ "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
} else {
// todo OpenISP telly
file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_normal.tok";
file_path = ServiceDeps+ "/wtv-1800/tellyscripts/UTV/utv_normal.tok";
}
}
break;
@@ -100,8 +101,8 @@ if (session_data.data_store.wtvsec_login) {
case "bf0app":
prereg_contype = "text/tellyscript";
// if wtv-open-access: true then client expects OpenISP
if (session_data.get("wtv-open-access")) file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_OISP.tok";
else file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
if (session_data.get("wtv-open-access")) file_path = ServiceDeps+ "/wtv-1800/tellyscripts/bf0app/bf0app_OISP.tok";
else file_path = ServiceDeps+ "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
break;
// the following are not yet zefie generated and may have an unknown username/password attached
@@ -109,8 +110,8 @@ if (session_data.data_store.wtvsec_login) {
case "JP-Fiji":
prereg_contype = "text/tellyscript";
// if wtv-open-access: true then client expects OpenISP
if (session_data.get("wtv-open-access")) var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
else var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
if (session_data.get("wtv-open-access")) var file_path = ServiceDeps+ "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
else var file_path = ServiceDeps+ "/wtv-1800/tellyscripts/FIJI/dc_production_normal.tok";
break;
default:
@@ -120,7 +121,7 @@ if (session_data.data_store.wtvsec_login) {
if (socket.ssid.substr(0, 8) == "MSTVSIMU") {
prereg_contype = "text/dialscript";
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
var file_path = ServiceDeps+ "/wtv-1800/tellyscripts/UTV/utv_hsd.tok";
}
}
@@ -129,7 +130,7 @@ if (session_data.data_store.wtvsec_login) {
// assume old classic in flash mode, override user setting and send tellyscript
// because it is required to proceed in flash mode
prereg_contype = "text/tellyscript";
var file_path = __dirname + "/" + minisrv_config.config.ServiceDeps + "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
var file_path = ServiceDeps+ "/wtv-1800/tellyscripts/bf0app/bf0app_WTV_18006138199.tok";
var bf0app_update = true;
session_data.set("bf0app_update", bf0app_update);
}

View File

@@ -141,6 +141,7 @@ var runScriptInVM = function (script_data, user_contextObj = {}, privileged = fa
"minisrv_version_string": z_title,
"getServiceString": getServiceString,
"sendToClient": sendToClient,
"ServiceDeps": ServiceDeps,
"service_vaults": service_vaults,
"cwd": __dirname, // current working directory
@@ -1817,6 +1818,13 @@ if (minisrv_config.config.SessionStore) {
throw ("ERROR: No Session Storage Directory (SessionStore) defined!");
}
if (minisrv_config.config.ServiceDeps) {
var ServiceDeps = wtvshared.returnAbsolutePath(minisrv_config.config.ServiceDeps);
console.log(" * Configured Service Dependancies at", ServiceDeps);
} else {
throw ("ERROR: No Service Dependancies Directory (SessionDeps) defined!");
}
var service_ip = minisrv_config.config.service_ip;
Object.keys(minisrv_config.services).forEach(function (k) {
if (minisrv_config.services[k].disabled) return;