From a9420d3aa8a6c17160ca3693e0a1ced46579e53b Mon Sep 17 00:00:00 2001 From: EuAndreh Date: Sat, 1 Jun 2019 23:22:16 -0300 Subject: Wait for Nextcloud to fully sync before continuing with setup.sh --- public/nixos/setup.sh | 17 ++++++++++++++++- 1 file changed, 16 insertions(+), 1 deletion(-) mode change 100644 => 100755 public/nixos/setup.sh (limited to 'public/nixos/setup.sh') diff --git a/public/nixos/setup.sh b/public/nixos/setup.sh old mode 100644 new mode 100755 index 50ea2b1..c79491a --- a/public/nixos/setup.sh +++ b/public/nixos/setup.sh @@ -64,9 +64,24 @@ import_gpg() { green "Done." } +start_nextcloud() { + yellow "Starting Nextcloud process and leaving it on the background..." + nextcloud &> /dev/null & + disown + green "Done." + + yellow "Waiting for Nextcloud Git Annex repo to become available..." + while true; do + read -r -p "Has Nextcloud finished syncing? (Type uppercase sync): " sync + [ "$sync" = 'SYNC' ] && break + red "Please try again." + done + green "Done." +} + import_gpg +start_nextcloud -# import GPG key pair # download git annex from Nextcloud # wait for Nextcloud to finish sync # git annex enable -- cgit v1.2.3