Improve Dodona shell to not leave lingering processes

This commit is contained in:
Charlotte Van Petegem 2022-11-11 11:37:39 +01:00
parent 03dbd42974
commit d0839aa445
No known key found for this signature in database
GPG key ID: 019E764B7184435A

View file

@ -44,12 +44,18 @@
help = "Run everything required for a server"; help = "Run everything required for a server";
command = '' command = ''
memcached & memcached &
trap "kill $!" 0
mysql & mysql &
trap "kill $!" 0
bundle install bundle install
yarn install yarn install
rails jobs:work & rails jobs:work &
trap "kill $!" 0
yarn build:css --watch & yarn build:css --watch &
yarn build:js --watch trap "kill $!" 0
yarn build:js --watch &
trap "kill $!" 0
wait $!
''; '';
} }
{ {
@ -57,8 +63,21 @@
category = "general commands"; category = "general commands";
help = "Run everything"; help = "Run everything";
command = '' command = ''
server-support & memcached &
rails s trap "kill $!" 0
mysql &
trap "kill $!" 0
bundle install
yarn install
rails jobs:work &
trap "kill $!" 0
yarn build:css --watch &
trap "kill $!" 0
yarn build:js --watch &
trap "kill $!" 0
rails s &
trap "kill $!" 0
wait $!
''; '';
} }
]; ];