From 5d533f058c518a671e13d877a4a0b7f8e993213b Mon Sep 17 00:00:00 2001 From: SK Ali Arman Date: Tue, 24 Dec 2024 12:18:07 +0600 Subject: [PATCH] Check auto.cnf file existence (#52) Signed-off-by: SK Ali Arman --- init-script/run.sh | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/init-script/run.sh b/init-script/run.sh index a9b062e..bd0591e 100755 --- a/init-script/run.sh +++ b/init-script/run.sh @@ -5,7 +5,9 @@ rm -rf /run-scripts/* cp /tmp/scripts/* /scripts if [[ "$PITR_RESTORE" == "true" ]]; then if [[ "$HOSTNAME" != *"-0" ]]; then - rm /var/lib/mysql/auto.cnf + if [[ -f /var/lib/mysql/auto.cnf ]]; then + rm /var/lib/mysql/auto.cnf + fi fi fi