summaryrefslogtreecommitdiff
path: root/kvmd.install
diff options
context:
space:
mode:
authorDevaev Maxim <[email protected]>2021-02-15 04:16:03 +0300
committerDevaev Maxim <[email protected]>2021-02-15 04:16:03 +0300
commit0442ec32647674879545d17bb484418799ab16ed (patch)
treedaf0f91e9ad3e3f297f05ebe50e7e9eb8181808c /kvmd.install
parentc2df0c38710fe7686cbbe6cc0d6f725ba1b5e877 (diff)
vnc gencert
Diffstat (limited to 'kvmd.install')
-rw-r--r--kvmd.install12
1 files changed, 11 insertions, 1 deletions
diff --git a/kvmd.install b/kvmd.install
index 5e00512b..db2cb3a3 100644
--- a/kvmd.install
+++ b/kvmd.install
@@ -1,7 +1,7 @@
post_install() {
post_upgrade
- echo "==> Generating KVMD certificate ..."
+ echo "==> Generating KVMD-Nginx certificate ..."
kvmd-gencert --do-the-thing
}
@@ -19,6 +19,16 @@ post_upgrade() {
chown kvmd /var/lib/kvmd/msd || true
+ if [ ! -d /etc/kvmd/vnc/ssl ]; then
+ echo "==> Generating KVMD-VNC certificate ..."
+ kvmd-gencert --do-the-thing --vnc
+ fi
+
+ chown root:root /etc/kvmd/vnc/ssl
+ chown root:root /etc/kvmd/nginx/ssl
+ chmod 755 /etc/kvmd/vnc/ssl
+ chmod 755 /etc/kvmd/nginx/ssl
+
echo "==> Patching configs ..."
[ ! -f /boot/config.txt ] || sed -i -e 's/^dtoverlay=pi3-disable-bt$/dtoverlay=disable-bt/g' /boot/config.txt
[ ! -f /boot/config.txt ] || sed -i -e 's/^dtoverlay=dwc2$/dtoverlay=dwc2,dr_mode=peripheral/g' /boot/config.txt