diff --git a/setup.sh b/setup.sh index 307fa2e..4a5c429 100755 --- a/setup.sh +++ b/setup.sh @@ -5,8 +5,17 @@ read -r -p "Do you want to start the initial setup? (y/n): " INSTALL_GITEA if [ -z "$INSTALL_GITEA" ] || [[ "$INSTALL_GITEA" != "y" && "$INSTALL_GITEA" != "n" ]]; then - echo "Skipping inital setup. Exiting..." - exit 1 + echo "Skipping inital setup." + read -r -p "Do you want to migrate from an existing installation using scp? (y/n): " MIGRATE_GITEA + + if [ "$MIGRATE_GITEA" == "y" ]; then + read -r -p "Enter the remote user@host:/destination/of/gitea/data: " REMOTE_PATH + sudo scp -r "$REMOTE_PATH" ./data + else + echo "Exiting setup." + exit 0 + fi + else touch .env IPV4_ADDRESS=$(hostname -I | awk '{print $1}')