Commit e84efbc9 authored by Dominika Liberda's avatar Dominika Liberda 💽

worker now sources script instead of running in a new shell

parent 539493b0
......@@ -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
......
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment