1
1

Add dependency check.

This commit is contained in:
Derek Smith 2023-04-04 11:33:50 -04:00
parent 5a54400831
commit f2b02e474d
Signed by: farscapian
GPG Key ID: B443E530A14E1C90

View File

@ -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