From ab9adc1680b9f73623efce8088ceaab3aabcf9f7 Mon Sep 17 00:00:00 2001 From: Ahurac Date: Sat, 9 Mar 2024 00:07:51 +0100 Subject: [PATCH] =?UTF-8?q?Service=20runit=20virtiofsd=20:=20mise=20=C3=A0?= =?UTF-8?q?=20jour?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- etc/runit/sv/virtiofsd/finish | 8 ++++++++ etc/runit/sv/virtiofsd/run | 10 ++++++++-- 2 files changed, 16 insertions(+), 2 deletions(-) create mode 100755 etc/runit/sv/virtiofsd/finish 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