mirror of
https://github.com/kneutron/ansitest.git
synced 2025-01-16 04:42:55 +08:00
Add files via upload
This commit is contained in:
parent
c37ac6aeac
commit
f5d129c0bd
31
proxmox/proxmox-fix-pbs-storage-down-spamming-logs.sh
Normal file
31
proxmox/proxmox-fix-pbs-storage-down-spamming-logs.sh
Normal 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
|
Loading…
x
Reference in New Issue
Block a user