Commit 473e1028 authored by Jonathan Bryant's avatar Jonathan Bryant 💬


parent 34904aab
......@@ -3,8 +3,8 @@
FILES="authorized_keys ssh_host_key container_token"
check_penguin() {
if [ -z `lxc ls | grep "penguin | RUNNING"` ]; then
echo "Opps. Penguin isn't running. This might be fixable by just running 'lxc start penguin'. If penguin isn't running, then we cannot get the values we need to start an alternate container."
if [ -z "$(lxc ls | grep 'penguin | RUNNING')" ]; then
echo "Opps. Penguin is not running. This might be fixable by just running: lxc start penguin"
exit 1
......@@ -39,7 +39,7 @@ swap_penguin() {
lxc stop penguin --force
lxc rename penguin stretch --name="penguin" --user="$(user_penguin)" --image="$1" --lxd_remote="" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys" --container_name="penguin" --user="$(user_penguin)" --image="$1" --lxd_remote="" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys"
swap_penguin $1
\ No newline at end of file
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment