File tree Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Expand file tree Collapse file tree 2 files changed +7
-4
lines changed Original file line number Diff line number Diff line change 33dir=" $( cd " $( dirname " $0 " ) " && pwd ) "
44
55id=$1
6+ containername=$2
67
78
89touch $dir /lockfile
@@ -19,19 +20,19 @@ echo $runner > $dir/i
1920exec 200>& -
2021
2122# prevent users from spying on each other
22- lxc-attach --clear-env -n cee -- \
23+ lxc-attach --clear-env -n $containername -- \
2324 /bin/bash -c "
2425 chown runner$runner : -R /tmp/$id
2526 chmod 700 /tmp/$id
2627 " > /dev/null 2>&1
2728
2829# runner
2930timeout -s KILL 20 \
30- lxc-attach --clear-env -n cee -- \
31+ lxc-attach --clear-env -n $containername -- \
3132 /bin/bash -l -c " runuser runner$runner /tmp/$id /runner.sh /tmp/$id "
3233
3334
34- lxc-attach --clear-env -n cee -- \
35+ lxc-attach --clear-env -n $containername -- \
3536 /bin/bash -c "
3637 while pgrep -u runner$runner > /dev/null
3738 do
Original file line number Diff line number Diff line change @@ -13,8 +13,10 @@ import {
1313
1414class LXC {
1515 LXC_ROOT_FS : string ;
16+ CONTAINER : string ;
1617
1718 constructor ( container : string ) {
19+ this . CONTAINER = container ;
1820 // Check OS
1921 const os = platform ( ) ;
2022 if ( os !== "linux" ) {
@@ -119,7 +121,7 @@ class LXC {
119121
120122 return new Promise < string > ( ( resolve , reject ) => {
121123 exec (
122- `bash ${ __dirname } /../runners/lxc/lxc-execute.bash ${ id } ` ,
124+ `bash ${ __dirname } /../runners/lxc/lxc-execute.bash ${ id } ${ this . CONTAINER } ` ,
123125 ( err , stdout , stderr ) => {
124126 if ( err ) return reject ( err ) ;
125127 if ( stderr ) return reject ( stderr ) ;
You can’t perform that action at this time.
0 commit comments