Add dependency check.
This commit is contained in:
parent
5a54400831
commit
f2b02e474d
@ -1,8 +1,16 @@
|
|||||||
#!/bin/bash
|
#!/bin/bash
|
||||||
|
|
||||||
|
# https://www.sovereign-stack.org/ss-manage/
|
||||||
|
|
||||||
set -eu
|
set -eu
|
||||||
cd "$(dirname "$0")"
|
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
|
if ! lxc remote get-default | grep -q "local"; then
|
||||||
lxc remote switch "local"
|
lxc remote switch "local"
|
||||||
fi
|
fi
|
||||||
|
Loading…
Reference in New Issue
Block a user