update
This commit is contained in:
+1
-1
@@ -3,7 +3,7 @@
|
|||||||
|
|
||||||
action="$1"
|
action="$1"
|
||||||
FOLDER='/opt/idssys/ta-proxmenu'
|
FOLDER='/opt/idssys/ta-proxmenu'
|
||||||
VERS='2026.4.28-3'
|
VERS='2026.4.28-4'
|
||||||
|
|
||||||
noupdate=' restart cpu mm '
|
noupdate=' restart cpu mm '
|
||||||
|
|
||||||
|
|||||||
+4
-11
@@ -238,7 +238,6 @@ RESTART_PVE_SERVICES(){
|
|||||||
}
|
}
|
||||||
|
|
||||||
SET_VM_SHUTDOWNTIMEOUT(){
|
SET_VM_SHUTDOWNTIMEOUT(){
|
||||||
# regex="down=([[:digit:]]+)"
|
|
||||||
if [ "${1}" == "" ]; then
|
if [ "${1}" == "" ]; then
|
||||||
echo -en "${idsCL[LightCyan]}Would you like to set all VM's shutdown timeout to 180secs (Y/n)?${idsCL[Default]} "
|
echo -en "${idsCL[LightCyan]}Would you like to set all VM's shutdown timeout to 180secs (Y/n)?${idsCL[Default]} "
|
||||||
read -n 1 choice
|
read -n 1 choice
|
||||||
@@ -247,16 +246,10 @@ SET_VM_SHUTDOWNTIMEOUT(){
|
|||||||
fi
|
fi
|
||||||
case "${choice}" in
|
case "${choice}" in
|
||||||
[Nn]) echo;;
|
[Nn]) echo;;
|
||||||
*) echo
|
*)
|
||||||
#for vmid in $(pvesh get /cluster/resources --type vm --output-format json | jq '.[].vmid'); do
|
echo "Updating all VM's shutdown timeout to 180 seconds..."
|
||||||
# NEW_TIMEOUTS=$(grep "startup:" /etc/pve/nodes/*/qemu-server/${VMID}.conf | awk '{print $2}')
|
sed -E -i 's/(down=)[0-9]+/\1180/g' /etc/pve/nodes/*/qemu-server/*.conf
|
||||||
# NEW_TIMEOUTS="(${NEW_TIMEOUTS})"
|
[ ${action-x} ] && exit 0 || ENTER2CONTINUE
|
||||||
# [[ $NEW_TIMEOUTS =~ $regex ]] && down_value="${BASH_REMATCH[1]}"
|
|
||||||
echo "Updating all VM's shutdown timeout to 180 seconds..."
|
|
||||||
# sed -i "/startup:/c startup: ${NEW_TIMEOUTS}" /etc/pve/nodes/*/qemu-server/*.conf
|
|
||||||
sed -E -i 's/(down=)[0-9]+/\1180/g' /etc/pve/nodes/*/qemu-server/*.conf
|
|
||||||
|
|
||||||
#done
|
|
||||||
;;
|
;;
|
||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user