Mini Shell

Direktori : /usr/libexec/cloudlinux-backup/
Upload File :
Current File : //usr/libexec/cloudlinux-backup/post-mysql-thaw-script

#!/usr/bin/bash

source /etc/cloudlinux-backup/mysql_freeze.config

echo "$(date -Ins) - Post-thaw script started." >> "$FREEZE_LOGFILE"

if [ ! -e "$FREEZE_LOCKFILE" ]; then
  echo "$(date -Ins) - No freeze lock file found. Skip." >> "$FREEZE_LOGFILE"
  exit 0
fi

FREEZE_SESSION_PID=$(cat "$FREEZE_LOCKFILE")

echo "$(date -Ins) - Terminating freeze session. PID is $FREEZE_SESSION_PID." >> "$FREEZE_LOGFILE"
pkill -9 -P $FREEZE_SESSION_PID

echo "$(date -Ins) - Deleting freeze lock file..." >> "$FREEZE_LOGFILE"
rm -f "$FREEZE_LOCKFILE"

echo "$(date -Ins) - Unfreeze successful." >> "$FREEZE_LOGFILE"

Zerion Mini Shell 1.0