aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorEuAndreh <eu@euandre.org>2019-06-01 23:22:16 -0300
committerEuAndreh <eu@euandre.org>2019-06-01 23:22:16 -0300
commita9420d3aa8a6c17160ca3693e0a1ced46579e53b (patch)
treeefe9b52e64760aff754bcbd26a5c4114462fc3c8
parentAdd usage and import_gpg to setup.sh (diff)
downloaddotfiles-a9420d3aa8a6c17160ca3693e0a1ced46579e53b.tar.gz
dotfiles-a9420d3aa8a6c17160ca3693e0a1ced46579e53b.tar.xz
Wait for Nextcloud to fully sync before continuing with setup.sh
-rwxr-xr-x[-rw-r--r--]public/nixos/setup.sh17
1 files changed, 16 insertions, 1 deletions
diff --git a/public/nixos/setup.sh b/public/nixos/setup.sh
index 50ea2b1..c79491a 100644..100755
--- 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