Files
ProxmoxHelper/Playground/testVMfile.sh
2022-04-15 22:42:28 +02:00

10 lines
202 B
Bash

#!/bin/bash
#VMID=$1
VMID=101
FILE=/opt/test
if [ $(qm guest exec $VMID -- test -f $FILE |jq '.exitcode') == 0 ] ; then
echo "File exists in $VMID"
else
echo "File does not exist in $VMID."
fi