@@ -10,31 +10,32 @@ async function addScript(
10
10
port : string ,
11
11
build_cmds : string ,
12
12
) {
13
- if ( document . resource_type === "URL" ) {
14
- await exec (
15
- `bash -c "echo 'bash ../../src/backend/utils/automate.sh -u ${ document . resource } ${ document . subdomain } ' > /hostpipe/pipe"` ,
16
- ) ;
17
- } else if ( document . resource_type === "PORT" ) {
18
- await exec (
19
- `bash -c "echo 'bash ../../src/backend/utils/automate.sh -p ${ document . resource } ${ document . subdomain } ' > /hostpipe/pipe"` ,
20
- ) ;
21
- } else if ( document . resource_type === "GITHUB" && static_content == "Yes" ) {
22
- Deno . writeTextFile ( `/hostpipe/.env` , env_content )
23
- await exec (
24
- `bash -c "echo 'bash ../../src/backend/utils/container.sh -s ${ document . subdomain } ${ document . resource } ' > /hostpipe/pipe"` ,
25
- ) ;
26
- } else if ( document . resource_type === "GITHUB" && static_content == "No" ) {
27
- let dockerfile = dockerize ( stack , port , build_cmds ) ;
28
- Deno . writeTextFile ( `/hostpipe/Dockerfile` , dockerfile )
29
- Deno . writeTextFile ( `/hostpipe/.env` , env_content )
30
- await exec (
31
- `bash -c "echo 'bash ../../src/backend/utils/container.sh -g ${ document . subdomain } ${ document . resource } ${ port } ' > /hostpipe/pipe"` ) ;
32
- }
13
+ if ( document . resource_type === "URL" ) {
14
+ await exec (
15
+ `bash -c "echo 'bash ../../src/backend/shell_scripts/automate.sh -u ${ document . resource } ${ document . subdomain } ' > /hostpipe/pipe"` ,
16
+ ) ;
17
+ } else if ( document . resource_type === "PORT" ) {
18
+ await exec (
19
+ `bash -c "echo 'bash ../../src/backend/shell_scripts/automate.sh -p ${ document . resource } ${ document . subdomain } ' > /hostpipe/pipe"` ,
20
+ ) ;
21
+ } else if ( document . resource_type === "GITHUB" && static_content == "Yes" ) {
22
+ Deno . writeTextFile ( `/hostpipe/.env` , env_content ) ;
23
+ await exec (
24
+ `bash -c "echo 'bash ../../src/backend/shell_scripts/container.sh -s ${ document . subdomain } ${ document . resource } ' > /hostpipe/pipe"` ,
25
+ ) ;
26
+ } else if ( document . resource_type === "GITHUB" && static_content == "No" ) {
27
+ const dockerfile = dockerize ( stack , port , build_cmds ) ;
28
+ Deno . writeTextFile ( `/hostpipe/Dockerfile` , dockerfile ) ;
29
+ Deno . writeTextFile ( `/hostpipe/.env` , env_content ) ;
30
+ await exec (
31
+ `bash -c "echo 'bash ../../src/backend/shell_scripts/container.sh -g ${ document . subdomain } ${ document . resource } ${ port } ' > /hostpipe/pipe"` ,
32
+ ) ;
33
+ }
33
34
}
34
35
35
36
async function deleteScript ( document : DfContentMap ) {
36
37
await exec (
37
- `bash -c "echo 'bash ../../src/backend/utils /delete.sh ${ document . subdomain } ' > /hostpipe/pipe"` ,
38
+ `bash -c "echo 'bash ../../src/backend/shell_scripts /delete.sh ${ document . subdomain } ' > /hostpipe/pipe"` ,
38
39
) ;
39
40
}
40
41
0 commit comments