diff --git a/api/main.go b/api/main.go index da66fa2..423952e 100644 --- a/api/main.go +++ b/api/main.go @@ -61,6 +61,7 @@ func Execute(res http.ResponseWriter, req *http.Request) { "swift", "brainfuck", "bf", "rust", + "bash", } // check if the supplied language is supported diff --git a/lxc/executors/bash b/lxc/executors/bash new file mode 100644 index 0000000..07ee438 --- /dev/null +++ b/lxc/executors/bash @@ -0,0 +1,2 @@ +cd /tmp/$2 +runuser -l runner$1 -c "cd /tmp/$2 ; cat args.args | xargs -d '\n' timeout -s KILL 3 bash code.code" diff --git a/tests/test.sh b/tests/test.sh new file mode 100644 index 0000000..f2f0102 --- /dev/null +++ b/tests/test.sh @@ -0,0 +1 @@ +echo 'good'