From f2b02e474d7dcc14530f58669d289a8f0971647d Mon Sep 17 00:00:00 2001 From: Derek Smith Date: Tue, 4 Apr 2023 11:33:50 -0400 Subject: [PATCH] Add dependency check. --- manage.sh | 8 ++++++++ 1 file changed, 8 insertions(+) diff --git a/manage.sh b/manage.sh index f04416a..990fb99 100755 --- a/manage.sh +++ b/manage.sh @@ -1,8 +1,16 @@ #!/bin/bash +# https://www.sovereign-stack.org/ss-manage/ + set -eu cd "$(dirname "$0")" +# check to ensure dependencies are met. +if ! command -v lxc >/dev/null 2>&1; then + echo "This script requires 'lxd/lxc' to be installed. Please run 'install.sh'." + exit 1 +fi + if ! lxc remote get-default | grep -q "local"; then lxc remote switch "local" fi