From 3257c178d20dff95bdb6177cd8ad6b85204e0165 Mon Sep 17 00:00:00 2001 From: TheMightyV Date: Sat, 8 Jan 2022 12:07:00 +0100 Subject: require server-off for restoration in PWD only --- server.sh | 6 ++++-- 1 file changed, 4 insertions(+), 2 deletions(-) diff --git a/server.sh b/server.sh index 2b58798..d9c06b7 100755 --- a/server.sh +++ b/server.sh @@ -302,8 +302,6 @@ function is_in() { } function server_restore() { - assert_not_running - local backup_dir local snapshot_index local dest="$PWD" @@ -317,6 +315,10 @@ function server_restore() { dest="$3" fi + if [ "$dest" = "$PWD" ]; then + assert_not_running + fi + if [ ${#BACKUP_DIRS[@]} -eq 0 ]; then log_error "No backup directories found, abort" return 1 -- cgit v1.2.3