summaryrefslogtreecommitdiff
path: root/systemd/system/qemu
blob: 475ec107f6502c55d82069d9d93d4c82ebae4c95 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
#!/usr/bin/env bash
shopt -s lastpipe
set -euE -o pipefail

source "/etc/conf.d/qemu.d/$1"
args+=(
	-name "$1",debug-threads=on
	-pidfile "/run/qemu-$1/pid"
	-vnc     unix:"/run/qemu-$1/vnc.sock"
	-monitor unix:"/run/qemu-$1/monitor.sock",server,nowait
	-serial  file:"/dev/stdout"
	-daemonize
)
{
	qemu-system-"${system}" "${args[@]}"
	systemd-notify --ready
} | exec cat