From 65c7997d84ef28bff0c78015b0fdc63574bed1c8 Mon Sep 17 00:00:00 2001
From: Britney Fransen <brfransen@gmail.com>
Date: Sat, 4 Feb 2023 18:48:52 -0500
Subject: linhes-system: lh_system_start.sh: change install app install

---
 linhes/linhes-system/PKGBUILD             |  8 ++++----
 linhes/linhes-system/lh_system_start.sh   | 17 +++++++++++++----
 linhes/linhes-system/x11vnc.override.conf |  2 +-
 3 files changed, 18 insertions(+), 9 deletions(-)

diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD
index ace26d0..cd5e8a9 100755
--- a/linhes/linhes-system/PKGBUILD
+++ b/linhes/linhes-system/PKGBUILD
@@ -1,12 +1,12 @@
 pkgname=linhes-system
 pkgver=9.0.0
-pkgrel=34
+pkgrel=35
 arch=('x86_64')
 #install=$pkgname.install
 pkgdesc="Everything that makes LinHES a system"
 license=('GPL2')
 depends=('cronie' 'dbus-python' 'flatpak' 'firefox' 'glances' 'kdialog' 'libnotify'
-         'logrotate' 'linhes-templates' 'linhes-theme' 'ncdu'
+         'logrotate' 'linhes-templates' 'linhes-theme' 'mlocate' 'ncdu'
          'openssh' 'pacman-contrib' 'rsyslog' 'ttf-overlock' 'x11vnc')
 binfiles="add_storage.py balance_storage_groups.py empty_storage_groups.py remove_storage.py
           checkXFSfrag.sh enableIRWake.sh idle.py lh_system_start.sh lh_notify-send
@@ -30,7 +30,7 @@ sha256sums=('7f91d2afcb76e8e9063c6bbe05f5c3d134a6f67541aead8894d342c32d34ad98'
             'c7a2b2de44645e3a905b39d7411e5b8b27b60bd2944533fd4655c3b175755da1'
             'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27'
             '5e6d128f879b0fe7c1a190cccd75d4e5d00afc161f3bc9e92ffa2d87242cc9df'
-            '3525b5b7ed2aab17a6f16d4c1e223b51a4df251f65cbb81a9c8289f73d7e0670'
+            '1c4f9f7b2b3e5c7b6e0208b6ba47d8748da1052dc33a89182aa1315f9c95fe32'
             '6d4fb0ed1a5ed961b3a3884dce093118e50c2981a9cd5837d20abc5a6d4fd8aa'
             '87875d9e5f5ce18208f419698ce69b6bcbcd08955a57a4a13940e715af58b787'
             '91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9'
@@ -61,7 +61,7 @@ sha256sums=('7f91d2afcb76e8e9063c6bbe05f5c3d134a6f67541aead8894d342c32d34ad98'
             '71c564a12d9a8e2814a2bf67a1a3d70c1e9d3b50bc108f7043ed8c958c067b01'
             '6c42b2920c6a37bf3dd05755b9e3fdd80137708cc55a7d1bef2234c17dff0349'
             'dead17906b33a7f9d66ad13bb1c083a23438f45ece9bd5ec41ff86eda01c132a'
-            '2c9152ed542bb9c3aa516c6009125a757065100a060e0fa597243d4cbd92844f'
+            '7f5b366075fa61fadfcdbab2837f0c58f3a8004a59fc8948fec1647d2573ffaa'
             '73aae13c47223c4ebb45c5cb2aff19a72b6b32cc0d9e7c83de9f97ada593b411'
             'd4e37e72854edcba76b5464617bea3826e0495f9788340aa318d5f3cf29e87a2'
             'a9d0a94ff442453f0bec0b2e8afd591cf17b2845b6ae45ff300530114efd30af'
diff --git a/linhes/linhes-system/lh_system_start.sh b/linhes/linhes-system/lh_system_start.sh
index fb21b92..715af91 100755
--- a/linhes/linhes-system/lh_system_start.sh
+++ b/linhes/linhes-system/lh_system_start.sh
@@ -64,13 +64,22 @@ function storage_scan(){
 
 function install_lh_apps(){
     #install programs that are not needed on the iso
+    #check network connection
+    netwait=0
+    while ! nc -zw1 1.1.1.1 443; do
+        [ $netwait -gt 12 ] && msg "Could not install apps. Check internet connection. Cancelling Setup." && exit 1
+        msg "Waiting for internet connectivity..."
+        ((netwait++))
+        sleep 5
+    done
     msg "Installing apps."
-    sudo pacman -Syyy --noconfirm archlinux-keyring
+    konsole -e /bin/bash -i -c "sudo pacman -Syyy --noconfirm archlinux-keyring && sudo pacman -Syyy --noconfirm mythtv mythplugins-mytharchive mythplugins-mythmusic mythplugins-mythweb && flatpak install tv.plex.PlexHTPC --noninteractive --assumeyes"
+    #sudo pacman -Syyy --noconfirm archlinux-keyring
     #sudo pacman -Syyy --noconfirm flatpak firefox glances mlocate mythtv mythplugins-mytharchive mythplugins-mythmusic mythplugins-mythweb ncdu x11vnc
-    sudo pacman -Syyy --noconfirm mythtv mythplugins-mytharchive mythplugins-mythmusic mythplugins-mythweb
+    #sudo pacman -Syyy --noconfirm mythtv mythplugins-mytharchive mythplugins-mythmusic mythplugins-mythweb
     status=$?
     [ $status -eq 1 ] && msg "Could not install apps. Check internet connection. Cancelling Setup." && exit 1
-    flatpak install tv.plex.PlexHTPC --noninteractive --assumeyes
+    #flatpak install tv.plex.PlexHTPC --noninteractive --assumeyes
     gen_lib_xml.py
 }
 
@@ -86,7 +95,7 @@ function sql_setup(){
 }
 
 function localweb_setup(){
-    sudo pacman -Syyy --noconfirm linhes-web
+    konsole -e /bin/bash -i -c "sudo pacman -Syyy --noconfirm linhes-web"
     sudo cp /etc/lighttpd/lighttpd.conf /etc/lighttpd/lighttpd.conf.orig
     sudo cp /usr/share/linhes/templates/lighttpd.conf.template /etc/lighttpd/lighttpd.conf
     sudo systemctl enable --now lighttpd.service
diff --git a/linhes/linhes-system/x11vnc.override.conf b/linhes/linhes-system/x11vnc.override.conf
index f79e9c8..a1d5b39 100644
--- a/linhes/linhes-system/x11vnc.override.conf
+++ b/linhes/linhes-system/x11vnc.override.conf
@@ -1,7 +1,7 @@
 [Service]
 ExecStart=
 Type=forking
-ExecStart=/usr/bin/x11vnc -nap -wait 50 -noxdamage -rfbauth /home/mythtv/.vnc/passwd -display :0 -nocursor -forever -o /home/mythtv/.vnc/x11vnc.log -bg
+ExecStart=/usr/bin/x11vnc -nap -wait 50 -noxdamage -rfbauth /home/mythtv/.vnc/passwd -display :0 -forever -o /home/mythtv/.vnc/x11vnc.log -bg
 Restart=on-failure
 RestartSec=10
 User=mythtv
-- 
cgit v0.12

