@docupace/pipeline 1.0.1-2.ervins.7 → 1.0.1-2.ervins.9
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- package/package.json +1 -1
- package/src/next/apache.js +11 -10
package/package.json
CHANGED
package/src/next/apache.js
CHANGED
|
@@ -19,21 +19,22 @@ export async function addApacheSite() {
|
|
|
19
19
|
log('Error: HAPROXY_PRIVATE_KEY not set.');
|
|
20
20
|
process.exit(1);
|
|
21
21
|
}
|
|
22
|
-
|
|
23
|
-
|
|
24
|
-
await $`echo "${haproxyPrivateKey}" > private.key`;
|
|
22
|
+
|
|
23
|
+
await fs.writeFile('private.key', Buffer.from(haproxyPrivateKey, 'base64'));
|
|
25
24
|
await fs.chmod('private.key', 0o600);
|
|
26
|
-
console.log(await $`echo "key:";cat private.key|base64`);
|
|
27
|
-
|
|
28
25
|
|
|
29
|
-
|
|
30
|
-
console.log("Running command
|
|
31
|
-
const sshCmd = (script) =>
|
|
26
|
+
|
|
27
|
+
console.log("Running command");
|
|
28
|
+
const sshCmd = (server,script) =>
|
|
32
29
|
$`ssh -i private.key -o StrictHostKeyChecking=no root@${server} ${script}`;
|
|
33
30
|
|
|
31
|
+
let server = `${process.env.ENVIRONMENT}-apalb01a.corp.docupace.com`;
|
|
34
32
|
// The script is run twice in the Bash version
|
|
35
|
-
await sshCmd(`/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
36
|
-
|
|
33
|
+
await sshCmd(server, `/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
34
|
+
|
|
35
|
+
server = `${process.env.ENVIRONMENT}-apalb01b.corp.docupace.com`;
|
|
36
|
+
|
|
37
|
+
await sshCmd(server,`/root/repo/iis-preprod/scripts/addsite/add_core_site.sh ${process.env.ENVIRONMENT} ${process.env.SITE}`);
|
|
37
38
|
}
|
|
38
39
|
|
|
39
40
|
|