Add files via upload

This commit is contained in:
kneutron 2024-06-20 06:11:59 -06:00 committed by GitHub
parent c37ac6aeac
commit f5d129c0bd
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -0,0 +1,31 @@
#!/bin/bash
# REF: https://forum.proxmox.com/threads/reduce-log-spamming-when-pbs-is-offline-error-fetching-datastores-500-cant-connect-to.147310/
echo "arg1 = 1/0, 1=enable"
echo "arg2 = storagename [optional]"
# running from cron, we need this
PATH=/usr/local/bin:/usr/local/sbin:/usr/bin:/usr/sbin:/bin:/sbin:/usr/local/games:/usr/games:/root/bin:/root/bin/boojum:/usr/X11R6/bin:/usr/NX/bin:
if [ "$2" = "" ]; then
storname=pbs-p2300m-laptop
else
storname="$2"
fi
pvesm status
if [ "$1" = "1" ]; then
echo "Enabling storage $storname"
pvesm set $storname --disable 0
else
echo "Disabling storage $storname"
pvesm set $storname --disable 1
fi
pvesm status
exit;
$0 0 pbs-vm-on-macpro