diff --git a/tools/pve/execute.sh b/tools/pve/execute.sh index fc19be981..3b34f97e5 100644 --- a/tools/pve/execute.sh +++ b/tools/pve/execute.sh @@ -50,7 +50,12 @@ function execute_in() { container=$1 name=$(pct exec "$container" hostname) echo -e "${BL}[Info]${GN} Execute inside${BL} ${name}${GN} with output: ${CL}" - pct exec "$container" -- bash -c "${custom_command}" | tee + if ! pct exec "$container" -- bash -c "command -v ${custom_command} >/dev/null 2>&1" + then + echo -e "${BL}[Info]${GN} Skipping ${name} ${RD}$container has no command: ${custom_command}" + else + pct exec "$container" -- bash -c "${custom_command}" | tee + fi } for container in $(pct list | awk '{if(NR>1) print $1}'); do