diff options
-rw-r--r-- | PKGBUILD | 1 | ||||
-rw-r--r-- | configs/systemd/kvmd.service | 2 | ||||
-rw-r--r-- | kvmd.install | 7 |
3 files changed, 10 insertions, 0 deletions
@@ -23,6 +23,7 @@ depends=( makedepends=(python-setuptools) source=("$url/archive/v$pkgver.tar.gz") md5sums=(SKIP) +install=kvmd.install build() { diff --git a/configs/systemd/kvmd.service b/configs/systemd/kvmd.service index ee5f2d68..5427d4c9 100644 --- a/configs/systemd/kvmd.service +++ b/configs/systemd/kvmd.service @@ -3,6 +3,8 @@ Description=The main Pi-KVM daemon After=network.target network-online.target nss-lookup.target [Service] +User=kvmd +Group=kvmd Type=simple Restart=always RestartSec=3 diff --git a/kvmd.install b/kvmd.install new file mode 100644 index 00000000..b77e1248 --- /dev/null +++ b/kvmd.install @@ -0,0 +1,7 @@ +post_install() { + id kvmd &>/dev/null || useradd -r -c "The main Pi-KVM daemon" -s /sbin/nologin kvmd +} + +post_remove() { + userdel kvmd &>/dev/null +} |