Commit
Author: Kevin Schoon [me@kevinschoon.com]
Hash: 4c74aa838123d671b2e7aa435178cd148bb76382
Timestamp: Thu, 02 Nov 2023 21:04:56 +0000 (11 months ago)

+3 -1 +/-2 browse
install system service along with user for systemd
1diff --git a/Makefile b/Makefile
2index afc3b96..f4e7b65 100644
3--- a/Makefile
4+++ b/Makefile
5 @@ -16,11 +16,14 @@ clean:
6 install: bin/qemu-shim
7 install -m 0755 bin/qemu-shim /usr/bin
8 install -m 0644 contrib/qemu-shim@.service /usr/lib/systemd/user
9+ install -m 0644 contrib/qemu-shim@.service /usr/lib/systemd/system
10
11 uninstall:
12 [[ -f /usr/bin/qemu-shim ]] && rm -v /usr/bin/qemu-shim || true
13 [[ -f /usr/lib/systemd/user/qemu-shim@.service ]] && \
14 rm -v /usr/lib/systemd/user/qemu-shim@.service || true
15+ [[ -f /usr/lib/systemd/system/qemu-shim@.service ]] && \
16+ rm -v /usr/lib/systemd/system/qemu-shim@.service || true
17
18 bin/fake-qemu: bin
19 echo "#!/bin/sh" > $@
20 diff --git a/main.c b/main.c
21index 8a72244..82ec811 100644
22--- a/main.c
23+++ b/main.c
24 @@ -14,7 +14,6 @@
25 #include <unistd.h>
26
27 #define _MONITOR_REGEXP "unix:\\([-/.[:alnum:]]*\\)"
28- #define _SPICE_REGEXP ".*addr=\\([-/.[:alnum:]]*\\)"
29 #define _SHUTDOWN_CMD "system_powerdown\n"
30 #define _GRACE_PERIOD 15
31 #define _MAX_SOCKET_TIMEOUT 5