|
|
@ -79,8 +79,8 @@ const configToJobData = ( |
|
|
|
entries: [keyof FormConfigData, FormConfigData[keyof FormConfigData]][], |
|
|
|
entries: [keyof FormConfigData, FormConfigData[keyof FormConfigData]][], |
|
|
|
) => |
|
|
|
) => |
|
|
|
entries |
|
|
|
entries |
|
|
|
.reduce<string>((previous, [key, value]) => { |
|
|
|
.reduce<string>((previous, [key, { value }]) => { |
|
|
|
previous += `${key}=${value}\n`; |
|
|
|
previous += `${key}=${value}\\n`; |
|
|
|
|
|
|
|
|
|
|
|
return previous; |
|
|
|
return previous; |
|
|
|
}, '') |
|
|
|
}, '') |
|
|
@ -96,16 +96,16 @@ export const configStriker: RequestHandler< |
|
|
|
stdoutVar(body, 'Begin initialize Striker; body='); |
|
|
|
stdoutVar(body, 'Begin initialize Striker; body='); |
|
|
|
|
|
|
|
|
|
|
|
const { |
|
|
|
const { |
|
|
|
adminPassword: rAdminPassword = '', |
|
|
|
adminPassword: rAdminPassword, |
|
|
|
domainName: rDomainName = '', |
|
|
|
domainName: rDomainName, |
|
|
|
hostName: rHostName = '', |
|
|
|
hostName: rHostName, |
|
|
|
hostNumber: rHostNumber = 0, |
|
|
|
hostNumber: rHostNumber, |
|
|
|
dns: rDns = '', |
|
|
|
dns: rDns, |
|
|
|
gateway: rGateway = '', |
|
|
|
gateway: rGateway, |
|
|
|
gatewayInterface: rGatewayInterface = '', |
|
|
|
gatewayInterface: rGatewayInterface, |
|
|
|
networks = [], |
|
|
|
networks = [], |
|
|
|
organizationName: rOrganizationName = '', |
|
|
|
organizationName: rOrganizationName, |
|
|
|
organizationPrefix: rOrganizationPrefix = '', |
|
|
|
organizationPrefix: rOrganizationPrefix, |
|
|
|
} = body; |
|
|
|
} = body; |
|
|
|
|
|
|
|
|
|
|
|
const adminPassword = sanitize(rAdminPassword, 'string'); |
|
|
|
const adminPassword = sanitize(rAdminPassword, 'string'); |
|
|
@ -155,7 +155,7 @@ export const configStriker: RequestHandler< |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|
assert( |
|
|
|
assert( |
|
|
|
REP_PEACEFUL_STRING.test(organizationName), |
|
|
|
organizationName.length > 0, |
|
|
|
`Data organization name cannot be empty; got [${organizationName}]`, |
|
|
|
`Data organization name cannot be empty; got [${organizationName}]`, |
|
|
|
); |
|
|
|
); |
|
|
|
|
|
|
|
|
|
|
|