dataset/seed/applicationservice/2022.03.08/base/manual/install/install_machines
Emmanuel Garette 5ccb69012b dovecot
2022-05-04 10:29:03 +02:00

27 lines
673 B
Bash
Executable file

#!/bin/bash -e
HOST_NAME=$1
if [ -z "$HOST_NAME" ]; then
echo "usage: $0 host name"
exit 1
fi
MACHINES=""
for image in *; do
if [ -d "$image" ]; then
for os in $image/configurations/*; do
if [ -d "$os" ]; then
osname="$(basename $os)"
if [ -f "host/configurations/$HOST_NAME/etc/systemd/nspawn/$osname.nspawn" ]; then
MACHINES="$MACHINES$osname "
fi
echo
echo "Install machine $image"
./install_machine "$HOST_NAME" "$image" "$osname"
fi
done
fi
done
machinectl enable $MACHINES
machinectl start $MACHINES
exit 0