From 345fc9147e065d8acd3c67570bbc9380bbd87be0 Mon Sep 17 00:00:00 2001 From: "Alex A. Naanou" Date: Thu, 30 Jan 2025 20:21:07 +0300 Subject: [PATCH] ... Signed-off-by: Alex A. Naanou --- nextcloud/migrate.sh | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/nextcloud/migrate.sh b/nextcloud/migrate.sh index 31f3446..7f71acf 100755 --- a/nextcloud/migrate.sh +++ b/nextcloud/migrate.sh @@ -46,6 +46,8 @@ fi FROM=$1 TO=$2 +SLEEP=${SLEEP:-} + # XXX should we build TO if it's not there??? @@ -57,6 +59,9 @@ TO=$2 @ lxc-attach $TO -- turnkey-occ maintenance:mode --on # XXX should we sleep here for a minute or 6 as is recommended in the docs??? +[ -z "$SLEEP" ] \ + || [ $SLEEP <= 0 ] \ + || sleep $(( $SLEEP * 60 )) # sql @ lxc-attach $TO -- mysql -e "DROP DATABASE nextcloud"