From ada05c4acafc9ad89bb68ab5c3485b90431e4c60 Mon Sep 17 00:00:00 2001 From: Andrew Engelbrecht Date: Sun, 24 Oct 2021 22:12:34 -0400 Subject: [PATCH] check for open local port before starting backup this prints a more helpful info than the default restic error --- kaya | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/kaya b/kaya index 3eaebd8..c2d4b7d 100755 --- a/kaya +++ b/kaya @@ -201,6 +201,12 @@ main() { update-htpasswd-file + if ! lsof -Pi ":${local_port}" -sTCP:LISTEN -t > /dev/null ; then + echo "kaya: error: rest-server is not listening on port ${local_port}" >&2 + echo "kaya: error: start rest-server or update ${global_conf}" >&2 + exit 1 + fi + if [[ $action == backup ]]; then start-backup fi -- 2.25.1