fix & for subshell

This commit is contained in:
tschettervictor
2025-05-04 12:35:12 -06:00
parent 39ed1aaec6
commit 76cda4b53f
17 changed files with 25 additions and 18 deletions

View File

@@ -125,7 +125,7 @@ for _jail in ${JAILS}; do
RETURN=$(($RETURN+$ERROR_CODE))
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -293,7 +293,7 @@ for _jail in ${JAILS}; do
fi
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -100,7 +100,7 @@ for _jail in ${JAILS}; do
error_continue "[ERROR]: CP failed: ${host_path} -> ${jail_path}"
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -120,7 +120,7 @@ destroy_jail() {
fi
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -108,7 +108,7 @@ for _jail in ${DEST_TARGET}; do
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -287,7 +287,7 @@ for _jail in ${JAILS}; do
esac
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -198,7 +198,7 @@ for _jail in ${JAILS}; do
mount -F "${bastille_jailsdir}/${_jail}/fstab" -a || error_continue "Failed to mount volume: ${_fullpath}"
echo "Added: ${_fstab_entry}"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -130,7 +130,7 @@ for _jail in ${JAILS}; do
fi
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -112,10 +112,17 @@ set_target "${TARGET}"
for _jail in ${JAILS}; do
(
# Only restart running jails
if check_target_is_running "${_jail}"; then
bastille stop ${_stop_options} ${_jail}
bastille start ${_start_options} ${_jail}
fi
done
) &
bastille_running_jobs "${bastille_process_limit}"
done
wait

View File

@@ -103,7 +103,7 @@ for _jail in ${JAILS}; do
jexec -l "${_jail}" /usr/sbin/service "$@"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -210,7 +210,7 @@ for _jail in ${JAILS}; do
# Delay between jail action
sleep "${DELAY_TIME}"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -151,7 +151,7 @@ for _jail in ${JAILS}; do
done
fi
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -103,7 +103,7 @@ for _jail in ${JAILS}; do
jexec -l "${_jail}" /usr/sbin/sysrc "$@"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -120,7 +120,7 @@ for _jail in ${JAILS}; do
;;
esac
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -476,7 +476,7 @@ for _jail in ${JAILS}; do
info "\nTemplate applied: ${TEMPLATE}"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -130,7 +130,7 @@ for _jail in ${JAILS}; do
echo "Unmounted: ${_jailpath}"
)
) &
bastille_running_jobs "${bastille_process_limit}"

View File

@@ -138,7 +138,7 @@ for _jail in ${JAILS}; do
;;
esac
)
) &
bastille_running_jobs "${bastille_process_limit}"