Commit 2724b0cb authored by Jonathan Bryant's avatar Jonathan Bryant 💬

Update distro.sh

parent cb3b02b1
#!/bin/bash
FILES="authorized_keys ssh_host_key container_token"
FILES="ssh_authorized_keys ssh_host_key container_token"
check_penguin() {
if [ -z "$(/usr/bin/lxc ls | /bin/grep 'penguin | RUNNING')" ]; then
......@@ -12,9 +12,9 @@ check_penguin() {
get_file() {
# All ssh mounts have an added term.
if [ -z "$(echo $1 | /bin/grep ssh)" ]; then
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.ssh-$1"
else
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.$1"
else
local PATH="/mnt/stateful/lxd/devices/penguin/disk.$1.dev-.ssh-$1"
fi
# Workaround for the read protected files at rest.
if [ -f $PATH ]; then
......@@ -41,7 +41,7 @@ swap_penguin() {
local USER="$(user_penguin)"
/usr/bin/lxc stop penguin --force
/usr/bin/lxc rename penguin stretch
/usr/bin/run_container.sh --container_name="penguin" --user="$USER" --container_image="$1" --lxd_remote="https://images.linuxcontainers.com" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys"
/usr/bin/run_container.sh --container_name="penguin" --user="$USER" --lxd_image="$1" --lxd_remote="https://images.linuxcontainers.com" --container_token="$container_token" --host_public_key="$ssh_host_key" --guest_private_key="$authorized_keys"
}
check_penguin
......
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