worker now sources script instead of running in a new shell

merge-requests/2/head
Dominika Liberda 2020-10-05 02:17:48 +02:00
parent 539493b094
commit e84efbc9b0
1 changed files with 1 additions and 1 deletions

View File

@ -6,7 +6,7 @@
function worker_add() {
if [[ -x "${cfg[namespace]}/workers/$1/worker.sh" ]]; then
while true; do
"${cfg[namespace]}/workers/$1/worker.sh"
source "${cfg[namespace]}/workers/$1/worker.sh"
sleep $2
if [[ $(cat "${cfg[namespace]}/workers/$1/control") == "die" ]]; then
echo "" > ${cfg[namespace]}/workers/$1/control