diff --git a/etc/runit/sv/virtiofsd/finish b/etc/runit/sv/virtiofsd/finish new file mode 100755 index 0000000..964aeb8 --- /dev/null +++ b/etc/runit/sv/virtiofsd/finish @@ -0,0 +1,8 @@ +#!/bin/sh -e + +# Read configuration +sourceconf() { [ -r "$1" ] && . "$1"; } +sourceconf ./conf + +# Delete socket and PID file +exec rm -f "$socket" "${socket}.pid" diff --git a/etc/runit/sv/virtiofsd/run b/etc/runit/sv/virtiofsd/run index ef13895..616294f 100755 --- a/etc/runit/sv/virtiofsd/run +++ b/etc/runit/sv/virtiofsd/run @@ -1,7 +1,13 @@ #!/bin/sh -e +# Read configuration +sourceconf() { + [ -r "$1" ] && . "$1" +} +sourceconf ./conf + # Start a virtiofsd sharing qemu shared dir exec /usr/lib/virtiofsd \ - --shared-dir ~qemu/shared \ - --socket-path /run/virtiofsd.sock \ + --shared-dir "$shared_dir" \ + --socket-path "$socket" \ --socket-group qemu