This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Define the directory where logs will be stored | |
| LOG_DIR="/var/log/qemu-agent-hooks" | |
| # Get the type of event (freeze or thaw) passed as the first argument | |
| EVENT_TYPE="$1" | |
| # --- Script Logic --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/sh | |
| # Flush MySQL tables to disk before the filesystem is frozen. | |
| # Keeps a read lock to avoid write accesses from other clients until thawed. | |
| MYSQL="/usr/bin/mysql" | |
| MYSQL_OPTS="-uroot" # "-prootpassword" | |
| FIFO="/var/run/mysql-flush.fifo" | |
| # Check if mysql is installed and the server is running | |
| if ! [ -x "$MYSQL" ] || ! "$MYSQL" $MYSQL_OPTS < /dev/null; then |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| #!/bin/bash | |
| # Define the directory where logs will be stored | |
| LOG_DIR="/var/log/qemu-agent-hooks" | |
| # Get the type of event (freeze or thaw) passed as the first argument | |
| EVENT_TYPE="$1" | |
| # --- Script Logic --- |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| cleanpvc() { | |
| if [ -z "$1" ]; then | |
| echo "Error: Please provide a Persistent Volume Claim (PVC) name." | |
| echo "Usage: cleanpvc <pvc-name>" | |
| return 1 | |
| fi | |
| local PVC_NAME="$1" | |
| echo "Attempting to remove system annotations from PVC: ${PVC_NAME}..." |
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| # Forget to install the Trilio console plugin to Openshift? | |
| # Add it via the CLI. Wait a minute for it to reconcile. | |
| oc patch consoles.operator.openshift.io cluster --type=merge -p '{"spec":{"plugins": ["trilio-console-plugin"]}}' | |