REFACTOR: Refactored core.sh to avoid SC2046
* Affects functions shutdown (L#40) * and err_exit (L#53) Signed-off-by: Stephan Wendel <me@stephanwe.de>
This commit is contained in:
parent
24f9257a47
commit
16db04fa8a
@ -37,7 +37,9 @@ function err_exit {
|
||||
log_msg "Goodbye..."
|
||||
fi
|
||||
if [ -n "$(jobs -pr)" ]; then
|
||||
kill $(jobs -pr)
|
||||
jobs -pr | while IFS='' read -r job_id; do
|
||||
kill "${job_id}"
|
||||
done
|
||||
fi
|
||||
exit 1
|
||||
}
|
||||
@ -48,7 +50,9 @@ function shutdown {
|
||||
log_msg "Shutdown or Killed by User!"
|
||||
log_msg "Please come again :)"
|
||||
if [ -n "$(jobs -pr)" ]; then
|
||||
kill $(jobs -pr)
|
||||
jobs -pr | while IFS='' read -r job_id; do
|
||||
kill "${job_id}"
|
||||
done
|
||||
fi
|
||||
log_msg "Goodbye..."
|
||||
exit 0
|
||||
|
Loading…
x
Reference in New Issue
Block a user