blob: 3e504d4852ed75c0de63a2773d892a46ec338a16 (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
|
post_install() {
post_upgrade
echo "==> Generating KVMD certificate ..."
kvmd-gencert
}
post_upgrade() {
echo "==> Configuring KVMD users and groups ..."
id kvmd &>/dev/null || useradd -r -c "The main Pi-KVM daemon" -s /sbin/nologin kvmd
for group in gpio uucp systemd-journal; do
(groupmems -l -g "$group" | grep kvmd >/dev/null) || groupmems -g "$group" -a kvmd
done
id kvmd-nginx &>/dev/null || useradd -r -c "Pi-KVM Nginx Server" -s /sbin/nologin kvmd-nginx
(groupmems -l -g kvmd | grep kvmd-nginx >/dev/null) || groupmems -g kvmd -a kvmd-nginx
chown root:kvmd \
/usr/share/kvmd/configs.default/kvmd/*passwd \
/etc/kvmd/*passwd
}
post_remove() {
userdel kvmd &>/dev/null
}
|