trixie/roles/lmn_vm/files/start-virtiofsd.sh

17 lines
376 B
Bash
Raw Normal View History

#!/usr/bin/bash
set -eu
# if less than one arguments supplied, display usage
if [[ $# -ne 1 ]]; then
echo "This script takes as input the name of the VM " >&2
echo "Usage: $0 vm_name" >&2
exit 1
fi
VM_NAME="$1"
## Make sure VMs can read the base directory:
chgrp 1010 "/lmn/media/${SUDO_USER}"
systemctl restart virtiofs@${VM_NAME}-clone:${SUDO_USER}.service