#!/bin/sh if [ "$2" = "post-start" ]; then lxc-attach "$1" < /dev/null if [ \$? -eq 0 ]; then echo 'http://dl-cdn.alpinelinux.org/alpine/v3.20/main' > /etc/apk/repositories echo 'http://dl-cdn.alpinelinux.org/alpine/v3.20/community' >> /etc/apk/repositories fi export PATH=/sbin:\$PATH apk update apk upgrade openrc -s sshd status 2>&1 | grep 'does not exist' &> /dev/null if [ \$? -eq 0 ]; then apk add openssh-server openrc -s sshd start rc-update add sshd echo 'Welcome to Alpine!' > /etc/motd fi EOF fi