diff options
Diffstat (limited to 'linhes/linhes-system')
| -rw-r--r-- | linhes/linhes-system/69-hdparm.rules | 1 | ||||
| -rwxr-xr-x | linhes/linhes-system/PKGBUILD | 31 | ||||
| -rwxr-xr-x | linhes/linhes-system/add_storage.py | 19 | ||||
| -rwxr-xr-x | linhes/linhes-system/balance_storage_groups.py | 2 | ||||
| -rwxr-xr-x | linhes/linhes-system/empty_storage_groups.py | 26 | ||||
| -rwxr-xr-x | linhes/linhes-system/idle.py | 20 | ||||
| -rwxr-xr-x | linhes/linhes-system/lh_apply_UI_settings.sh | 13 | ||||
| -rwxr-xr-x | linhes/linhes-system/lh_myth_status.py | 72 | ||||
| -rw-r--r-- | linhes/linhes-system/lh_sqlserver.cnf | 15 | ||||
| -rwxr-xr-x | linhes/linhes-system/lh_system_backup_job | 2 | ||||
| -rwxr-xr-x | linhes/linhes-system/lh_system_start.sh | 6 | ||||
| -rw-r--r-- | linhes/linhes-system/linhes-profile.sh | 2 |
12 files changed, 93 insertions, 116 deletions
diff --git a/linhes/linhes-system/69-hdparm.rules b/linhes/linhes-system/69-hdparm.rules new file mode 100644 index 0000000..414698e --- /dev/null +++ b/linhes/linhes-system/69-hdparm.rules @@ -0,0 +1 @@ +ACTION=="add|change", SUBSYSTEM=="block", ENV{DEVTYPE}=="disk", KERNEL=="sd*", ATTRS{queue/rotational}=="1", RUN+="/usr/bin/hdparm -B 254 -S 0 $env{DEVNAME}" diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD index b86b1f8..125f767 100755 --- a/linhes/linhes-system/PKGBUILD +++ b/linhes/linhes-system/PKGBUILD @@ -1,14 +1,15 @@ pkgname=linhes-system pkgver=9.0.0 -pkgrel=89 +pkgrel=103 arch=('x86_64') #install=$pkgname.install pkgdesc="Everything that makes LinHES a system" license=('GPL2') depends=('cronie' 'dbus-python' 'dvb-firmware' 'expect' 'flatpak' 'firefox' 'glances' 'inetutils' 'kdialog' 'kwalletmanager' 'libnotify' - 'logrotate' 'linhes-templates' 'linhes-theme' 'mlocate' 'moreutils' 'ncdu' 'python-dateutil' 'python-pytz' - 'python-tzlocal' 'openssh' 'pacman-contrib' 'rsyslog' 'ttf-overlock' 'wget' 'x11vnc' + 'logrotate' 'linhes-templates' 'linhes-theme' 'mlocate' 'moreutils' 'ncdu' 'pacman-contrib' + 'plasma-x11-session' 'python-dateutil' 'python-pytz' 'python-tzlocal' 'openssh' + 'rsyslog' 'ttf-overlock' 'wget' 'x11vnc' 'intel-media-driver' 'libva-intel-driver' 'pigz') 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 @@ -23,22 +24,22 @@ source=($binfiles 'lh_mtc.cron' 'paccache.cron' 'flatpak_update.cron' 'xfs_defrag.cron' 'pacman_orphans.cron' 'readme_is_xml' 'add_storage.readme' 'LinHES-release' 'lh_log_care.cron' '79-cronie.hook' 'fstrim.hook' 'openssh.hook' 'plex_lib.conf' 'rsyslog.hook' - '10-monitor.conf' '81-wol.rules' 'x11vnc.override.conf' 'lh_lighttpd.conf' 'lh_php.ini' + '10-monitor.conf' '81-wol.rules' '69-hdparm.rules' 'x11vnc.override.conf' 'lh_lighttpd.conf' 'lh_php.ini' 'system-sudo.rules' 'linhes-profile.sh' 'lh_sqlserver.cnf' 'lh_restart_needed.hook' 'lh_system_start.sh.desktop' 'rc6_mce.toml' 'recordings.cron' 'rsyslog.mythtv.conf') -sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0' - '1115809a2d80c1ead7cfc5df05e1d6427255912a8303594574b3be23d3d3e4f1' - '97fe9e851c782fa9f85c5b69b110ccff2817dd4fa2a6d9ff6ee225dc558677e4' +sha256sums=('1fb11c7f472df9e3066866301962c2678b80c2fbd988dc34db022d51e1101a42' + '8ae6de3d0ff8e777aeea56f74f38676080142148ac3a32f828462d85c39e7cf7' + '79a3fe8622dbc5351316c0e36c26f8443334fcf8eea324cf0a0efe0e4c2c1a93' 'ff261f41efec8a9963f9f59100cbe75f015028a2ed3a863ce0cb473f2ebb7b76' '8b54c31b8efde3917f603c5307bebb0a2a00239ad9a983c2f5d8120003256449' 'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27' - '9e52a21e9d0f3f993b819587256a1cd57dca04451d5f2d0fd76667b1d3f860f1' - 'fbd1640106b3d9356452625753a6f1974e0be905b9f4732a1287b3905806cba8' + 'a79edfeb88b90a8f5538a159b39ba235caba8c6d6b2a39a20faa3ae0301b770b' + '575ae8455b4862f68454516718ddb0531755f194ac278794f9ba175da5a30cab' '1c36e4fdf41c1063e0a127ce4a90fbdef19879c381a87f622d7399ca931560cc' '87875d9e5f5ce18208f419698ce69b6bcbcd08955a57a4a13940e715af58b787' - '93d664f4a46fda05d0f754d19df40cbda120e325b80c07092345b14763993833' + '192bfff1b8d46e0ebb969618847d9993aba3b1b578053c8d701dad9f9e758f86' 'a523388ffdc6f30f2dd2ef4803b21bded8a35bfded499dc66b786adec71840a3' - '6ea7f807a29631e33629da14e7ca6481310f0416c5d6f8fb415a76fa90fb9b76' + 'eec03b722449a55e589eb79aade87e9b2a964e82b8fe23723016b640a079de2a' '91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9' '5cacfdd02833e5a3130d765573e772e6bd5030336ba86239c5e4db5ffa36fc69' 'd51253c207d3315997d7122cb774c6d0fc38975c33e66bf416f0b1b95cf86e5b' @@ -47,7 +48,7 @@ sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0' 'cd3306991c8b63f5402c0e52405cc1a6581cb3c42af74b7c2f879c8192f95610' 'e371c6a289c68fe200d7da856c20a8c579efa23178f4d62235f7359d7f6e49a1' 'ee9a4df83e463e0c8a2e862680a83cff07a36cf3606faf60f57bc11190ffb1c9' - '7b39ddc6ec31322c679a15349a567e4fae5c808769443b7bf4a4d8ee882259e6' + 'c801a69df165ca152f6e0de14fd7e24358ee9891732c9f0d10f65e73329e5db5' 'd2d69b2bf6315bd37ff5f5b2f0cde8ab2fb89bae18f8796dc5208ffc1a9d743e' 'a745356952470a5d718bef1961309ea30e4fa6a2860961cd52e09d6ec11e708e' '1819085bd2c9106482c5f243b95fddf3dae69212330ab76cb493add5c26a45a4' @@ -76,12 +77,13 @@ sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0' '6c42b2920c6a37bf3dd05755b9e3fdd80137708cc55a7d1bef2234c17dff0349' '09b9c1b2ee6a5bbe48c5f3755ad64628487b60a4eb6734efb292cefdb74fb657' 'efc2a04b67ea76661157e154228d4b58ae2e1b652f8ce41bc001a5a863d13573' + '7571e230ab4cf2a1285fdb9762d87d350ea350ce820e5806143b402aa1ea37e0' '67d0cb111d47609de4c60b84dc617fc817fdf092763fbd0cef270b5ee650d702' '023cba18580819018413608ec055d5ff8166b69525c32aa728ad1ecd7cf00aca' 'dae799f09a076e0f573ea516bc357f56f2fd3aa8e35ec0cf54b6b62282960ee0' 'aa1d831f25317a9cb8d7e9a7d7b6d51c8d03bd5b69f3bec27bea7644ca38fe9a' - 'cf884bad5caab9d5901b88b0ef41e3a39ea0b7a4614b8d14707d79941c899cbf' - '3ed91fb5a7894f82fb4895e06d2e3f1df3ac4f82e46c970d4a85aaa4edc24cf1' + '2553c3a877b6b18eed8269d5d78bd5676cd52fa5ead5b99a02f42bd134f12040' + '01416dadeb34ca8b18bb7326113672b3888b16a60133d501d48610d23b74d1eb' '197ff4bb3c1cafcb197268cac335f1f75ae26873aca5833d62cc51fade85176c' '0b9868a563036c81f8fdb8ab8bbad51934aca2a07e9d7634e24214791afda8e2' '1b965b5e7eeafdf3815c8f2722587a560693dd780327cca9910dc47fba0f1aef' @@ -156,6 +158,7 @@ package() { chmod 750 ${pkgdir}/etc/sudoers.d/ #udev rules + install -Dm0644 "${srcdir}/69-hdparm.rules" "${pkgdir}/etc/udev/rules.d/69-hdparm.rules" install -Dm0644 "${srcdir}/81-wol.rules" "${pkgdir}/etc/udev/rules.d/81-wol.rules" #disable dpms diff --git a/linhes/linhes-system/add_storage.py b/linhes/linhes-system/add_storage.py index cc6feb5..318e77b 100755 --- a/linhes/linhes-system/add_storage.py +++ b/linhes/linhes-system/add_storage.py @@ -5,7 +5,7 @@ #Disks that are mounted, in fstab, size < 5000 bytes, optical or #have already been seen will not be presented as an option. # -# Version 2.0.2 +# Version 2.1.0 import dbus import pickle @@ -147,7 +147,8 @@ class disk_device: return True def get_is_device(self): - match = re.search(r'part\d+$', self.device_file_path) + #match = re.search(r'part\d+$', self.device_file_path) + match = re.search(r'part\d+$', self.device_id) if match is None: return True else: @@ -214,6 +215,20 @@ class disk_device: if i[1] in mp: fstype = i[2] break + + loop = True + prompt = ''' + Format disk with what filesystem (xfs/ext4)?:''' + + while loop: + str1 = input(prompt) + + if str1 in ['xfs','ext4']: + loop = False + fstype=str1 + break + print("\n") + return fstype def lookup_format(self): diff --git a/linhes/linhes-system/balance_storage_groups.py b/linhes/linhes-system/balance_storage_groups.py index d91da60..8776428 100755 --- a/linhes/linhes-system/balance_storage_groups.py +++ b/linhes/linhes-system/balance_storage_groups.py @@ -89,7 +89,7 @@ if __name__ == '__main__': for dir in SGDIRSdata: mostFull = SGDIRSdata[i] i=i+1 - if len(glob.glob1(mostFull[0],"*.ts")) or len(glob.glob1(mostFull[0],"*.mpg")) or len(glob.glob1(mostFull[0],"*.nuv")): + if len(glob.glob(mostFull[0] + "*.ts")) or len(glob.glob(mostFull[0] + "*.mpg")) or len(glob.glob(mostFull[0] + "*.nuv")): break else: if i == 1: diff --git a/linhes/linhes-system/empty_storage_groups.py b/linhes/linhes-system/empty_storage_groups.py index 708c118..c36437e 100755 --- a/linhes/linhes-system/empty_storage_groups.py +++ b/linhes/linhes-system/empty_storage_groups.py @@ -1,6 +1,6 @@ #!/usr/bin/python -import argparse, glob, operator, os, random, shutil, subprocess, sys, signal +import argparse, glob, operator, os, random, shutil, subprocess, sys, signal, time shouldQuit = False def getFreeSpaceForDir(dir): @@ -24,6 +24,8 @@ def sizeof_fmt(num, suffix='B'): return "%.1f %s%s" % (num, 'Yi', suffix) def signal_handler(signal, frame): + if isBusy: + sys.exit(0) print("\nWill quit when file has been moved.\nMoving File...") global shouldQuit shouldQuit = True @@ -101,7 +103,7 @@ if __name__ == '__main__': print(" " + directory + " - Not Mounted") continue # Check if SG has data files to move - if len(glob.glob1(directory,"*.ts")) or len(glob.glob1(directory,"*.mpg")) or len(glob.glob1(directory,"*.nuv")) or len(glob.glob1(directory,"*.jpg")): + if len(glob.glob(directory + "*.ts")) or len(glob.glob(directory + "*.mpg")) or len(glob.glob(directory + "*.nuv")) or len(glob.glob(directory + "*.jpg")): freePcent = getFreePercentForDir(directory) freeSize = getFreeSpaceForDir(directory) SGDIRSdata.append([directory, freePcent, freeSize]) @@ -114,7 +116,7 @@ if __name__ == '__main__': sys.exit(0) # Exit if no SGs with data found - if SGcnt is 0: + if SGcnt == 0: print("\n'" + SGgrp + "' Storage Group directories have no files to move. Exiting.") sys.exit(0) @@ -163,11 +165,19 @@ if __name__ == '__main__': print("Check Only option was used. No files were moved.") shouldQuit = True else: - print("------------------------------------------------") - print("Checking System Status...") - if subprocess.call(["/usr/bin/python", "/usr/bin/idle.py", "-s"]): - print(" System is busy. The file will not be moved.") - sys.exit() + global isBusy + isBusy = True + while isBusy: + if shouldQuit: + sys.exit(0) + print("------------------------------------------------") + print("Checking System Status...") + if subprocess.call(["/usr/bin/python", "/usr/bin/idle.py", "-s"]): + print(" System is busy. The file will not be moved.") + print(" Waiting 5 minutes before trying again.") + time.sleep(300) + else: + isBusy = False print("Moving File...") try: shutil.move(filePathToMove, leastFull[0]) diff --git a/linhes/linhes-system/idle.py b/linhes/linhes-system/idle.py index 3f4b3bc..4b2db1e 100755 --- a/linhes/linhes-system/idle.py +++ b/linhes/linhes-system/idle.py @@ -1,7 +1,8 @@ #!/usr/bin/python -import argparse, os, re, subprocess, sys, time +import argparse, os, re, requests, subprocess, sys, time from datetime import datetime, date, timedelta +import xml.etree.ElementTree as ET def msg(cmdargs,msg): if cmdargs.silent is False: @@ -237,24 +238,31 @@ def mythfe_check(cmdargs,cursor,mythDB): for i in frontends: try: + URL = f"http://{i[0]}:6547/Frontend/GetStatus" msg(cmdargs," Checking %s's mythfrontend status..." %i) - frontend = mythDB.getFrontend(''.join(i)) + response = requests.get(URL, timeout=3) + root = ET.fromstring(response.text) + # Find the current location and state in the State element + state_element = root.find('State') + if state_element is not None: + location = state_element.find(".//String[Key='currentlocation']/Value") + state = state_element.find(".//String[Key='state']/Value") + if ( cmdargs.runningfe ): msg(cmdargs," %s's mythfrontend is RUNNING." %i) return False - location = frontend.sendQuery('Location') - if location == "standbymode": + if location is not None and location.text == "standbymode": msg(cmdargs," %s's mythfrontend is in Standby Mode." %i) continue - if ( location.startswith('Playback ') ): + if state is not None and state.text.startswith('Watching'): msg(cmdargs," %s's mythfrontend is PLAYING." %i) return False else: msg(cmdargs," %s's mythfrontend is NOT playing." %i) - if '.xml' in location or 'mainmenu' in location: + if location is not None and '.xml' in location.text or 'mainmenu' in location.text: msg(cmdargs," %s's mythfrontend is in MENUS." %i) else: #FE is not in menus, so it must be active in a plugin diff --git a/linhes/linhes-system/lh_apply_UI_settings.sh b/linhes/linhes-system/lh_apply_UI_settings.sh index e49d98f..482c286 100755 --- a/linhes/linhes-system/lh_apply_UI_settings.sh +++ b/linhes/linhes-system/lh_apply_UI_settings.sh @@ -1,8 +1,11 @@ #!/bin/bash -cp /usr/share/linhes/templates/plasma-org.kde.plasma.desktop-appletsrc ~/.config/ -plasma-apply-wallpaperimage /usr/share/linhes/templates/lights-bud-abstract-4k-cq.jpg -plasma-apply-colorscheme BreezeDark +if [ ! -f ~/.config/lh_configured ]; then + #cp /usr/share/linhes/templates/plasma-org.kde.plasma.desktop-appletsrc ~/.config/ + sed -i 's/launchers=.*/launchers=applications:systemsettings.desktop,preferred:\/\/filemanager,applications:org.kde.konsole.desktop,preferred:\/\/browser,applications:mythfrontend.desktop/' ~/.config/plasma-org.kde.plasma.desktop-appletsrc + plasma-apply-wallpaperimage /usr/share/linhes/templates/lights-bud-abstract-4k-cq.jpg + plasma-apply-colorscheme BreezeDark +fi kwriteconfig6 --group KDE --key SingleClick false kwriteconfig6 --file ~/.config/kscreenlockerrc --group Daemon --key Autolock false @@ -12,6 +15,10 @@ kwriteconfig6 --file ~/.config/powermanagementprofilesrc --group AC --group DPMS kwriteconfig6 --file ~/.powerdevilrc --group AC --group Display --key DimDisplayWhenIdle false kwriteconfig6 --file ~/.powerdevilrc --group AC --group Display --key TurnOffDisplayWhenIdle false kwriteconfig6 --file ~/.powerdevilrc --group AC --group SuspendAndShutdown --key AutoSuspendAction 0 +kwriteconfig6 --file ~/.config/donationmessage.notifyrc --group Event/ShowDonationMessage --key Action "" +kwriteconfig6 --file ~/.config/plasmanotifyrc --group Services --group donationmessage --key ShowPopups false +kwriteconfig6 --file ~/.config/plasmanotifyrc --group Services --group donationmessage --key ShowInHistory false + #sddm settings if grep -Fxq "User=km" /etc/sddm.conf.d/autologin.conf; then diff --git a/linhes/linhes-system/lh_myth_status.py b/linhes/linhes-system/lh_myth_status.py index c682d1c..2ed3d42 100755 --- a/linhes/linhes-system/lh_myth_status.py +++ b/linhes/linhes-system/lh_myth_status.py @@ -1,12 +1,9 @@ #!/usr/bin/python #This program is called on login to display the status of mythtv tuners & recording status -#Also will display alerts generated by xymon. If the location of xymon changes, this script needs to be updated. from MythTV import MythBE,MythDB,MythLog import datetime,pytz,re,socket,subprocess,sys,time from dateutil.parser import parse -from tzlocal import get_localzone - import os,glob from socket import gethostname; @@ -41,69 +38,6 @@ def formatTD(td): return_string = '%s%s%s%s' % (day_string, hour_string, minute_string, second_string) return return_string -def print_alerts(): - dir_name = "/home/xymon/var/login_alerts" - out_alert="" - try: - os.chdir(dir_name) - except: - pass - #print " myth_status: Couldn't change dir to %s" %dir_name - - file_list=glob.glob("*") - - if len(file_list) == 0: - #print " myth_status: no alert files found" - pass - else: - for alert_file in file_list: - out_line='' - datahost = '' - dataservice = '' - datacolor = '' - datadown = '' - try: - #print " myth_staus: reading in %s" %alert_file - f=open(alert_file,'r') - lines=f.readlines() - f.close() - except: - #print " myth_status: Couldn't open %s for reading" %alert_file - continue - - for line in lines: - try: - data,value=line.split(":") - except: - continue #exception occured try the next line - - if data == 'HOST': - datahost = value.strip() - elif data == 'SERVICE': - dataservice = value.strip() - elif data == 'COLOR': - datacolor = value.strip() - elif data == 'DOWN': - datadown = value.strip() - sec=int(datadown) - td_sec = datetime.timedelta(seconds=sec) - td_sec_formated = formatTD(td_sec) - - out_line =" %s on %s %s for %s \n" %(dataservice, - datahost,datacolor.upper(), - td_sec_formated) - out_alert += out_line - - print("System Alerts:") - print("--------------") - if len(out_alert) > 0: - print(out_alert) - print(" Go to http://%s and click Health & Maintenance for more information." %gethostname()) - else: - print(" All systems OK") - - return - #------------------------------------------- @@ -112,7 +46,6 @@ class tuner_recording_status: def __init__ (self,num_upcoming): self.now = datetime.datetime.now(pytz.utc) - self.currTZ = get_localzone() self.farout=99999999 self.next_start_diff=datetime.timedelta(self.farout) self.num_upcoming=num_upcoming @@ -186,7 +119,7 @@ class tuner_recording_status: title_chan="%s (%s)" %(i.title, i.channame) # convert timezone to local timezone start_time=parse(str(i.starttime)) - start_time=start_time.astimezone(self.currTZ) + start_time=start_time.astimezone() start_time_out=start_time.strftime("%a %b %d %I:%M%p") self.upcoming_list.append([start_time_out,i.hostname, title_chan]) @@ -234,7 +167,7 @@ class tuner_recording_status: title_chan="%s (%s)" %(i.title, i.channame) # convert timezone to local timezone start_time=parse(str(i.starttime)) - start_time=start_time.astimezone(self.currTZ) + start_time=start_time.astimezone() start_time_out=start_time.strftime("%a %b %d %I:%M%p") out_line=(start_time_out,i.hostname,title_chan) self.conflict_list.append(out_line) @@ -264,7 +197,6 @@ def go(): tuner.print_upcoming_recordings() tuner.print_conflict_list() tuner.print_next_start_time() - #print_alerts() if __name__ == "__main__": diff --git a/linhes/linhes-system/lh_sqlserver.cnf b/linhes/linhes-system/lh_sqlserver.cnf index be2d5bd..6475ea2 100644 --- a/linhes/linhes-system/lh_sqlserver.cnf +++ b/linhes/linhes-system/lh_sqlserver.cnf @@ -41,9 +41,10 @@ datadir=/data/srv/mysql skip-external-locking +skip-name-resolve=ON net_buffer_length = 8K -key_buffer_size = 768M +key_buffer_size = 512M max_allowed_packet = 1M tmp_table_size = 256M max_heap_table_size = 256M @@ -55,9 +56,10 @@ thread_cache_size = 8 query_cache_type = 0 query_cache_size = 0 query_cache_limit = 2M -join_buffer_size = 1M -ignore-db-dir = lost+found +join_buffer_size = 2M +ignore_db_dirs = lost+found table_open_cache = 5000 +table_definition_cache = 800 open_files_limit = 10000 # Uncomment the following if you are using InnoDB tables @@ -66,14 +68,13 @@ open_files_limit = 10000 #innodb_log_group_home_dir = /var/lib/mysql # You can set .._buffer_pool_size up to 50 - 80 % # of RAM but beware of setting memory usage too high -#innodb_buffer_pool_size = 16M +innodb_buffer_pool_size = 1500M #innodb_additional_mem_pool_size = 2M # Set .._log_file_size to 25 % of buffer pool size -innodb_log_file_size = 16M -#innodb_log_buffer_size = 8M +innodb_log_file_size = 375M +innodb_log_buffer_size = 32M #innodb_flush_log_at_trx_commit = 1 #innodb_lock_wait_timeout = 50 -innodb_buffer_pool_instances = 1 # This group is only read by MariaDB-10.8 servers. # If you use the same .cnf file for MariaDB of different versions, diff --git a/linhes/linhes-system/lh_system_backup_job b/linhes/linhes-system/lh_system_backup_job index 6d16596..e45d6ea 100755 --- a/linhes/linhes-system/lh_system_backup_job +++ b/linhes/linhes-system/lh_system_backup_job @@ -27,7 +27,7 @@ do fi done -if [ `mountpoint -q $BACKUPDISK 2> /dev/null` ]; then +if ! mountpoint -q "$BACKUPDISK"; then echo " The system doesn't have a second drive. Backup skipped." exit $backup_status fi diff --git a/linhes/linhes-system/lh_system_start.sh b/linhes/linhes-system/lh_system_start.sh index d1bd2b9..c02e217 100755 --- a/linhes/linhes-system/lh_system_start.sh +++ b/linhes/linhes-system/lh_system_start.sh @@ -40,7 +40,7 @@ function bashrc_setup(){ function nanorc_setup(){ sudo sed -i 's/# set tabsize.*/set tabsize 4/' /etc/nanorc sudo sed -i 's/# set tabstospaces.*/set tabstospaces/' /etc/nanorc - sudo sed -i 's/# include "\/usr\/share\/nano\/\*.nanorc"/include "\/usr\/share\/nano\/\*.nanorc"/' /etc/nanorc + sudo sed -i 's/.*\/usr\/share\/nano\/\*.nanorc.*/include \/usr\/share\/nano\/\*.nanorc/' /etc/nanorc } function storage_scan(){ @@ -61,7 +61,7 @@ function install_lh_apps(){ sleep 5 done msg "Installing apps." - 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 flatpak override tv.plex.PlexHTPC --filesystem=/run/lirc/lircd" + konsole -e /bin/bash -i -c "sudo pacman -Syyy --noconfirm archlinux-keyring && sudo pacman -Syyyu --noconfirm mythtv mythplugins-mytharchive mythplugins-mythmusic mythplugins-mythweb && flatpak install tv.plex.PlexHTPC --noninteractive --assumeyes && sudo flatpak override tv.plex.PlexHTPC --filesystem=/run/lirc/lircd" status=$? [ $status -eq 1 ] && msg "Cancelling Setup" "Could not connect to the internet to complete setup. Check the internet connection and from Konsole run lh_system_start.sh." && exit 1 gen_lib_xml.py @@ -141,7 +141,7 @@ function start_user_apps() { } function start_myth() { - STARTCMD="/usr/bin/mythfrontend --syslog local6 --quiet" + STARTCMD="/usr/bin/mythfrontend --disable-autodiscovery --noupnp --quiet --syslog local6" if [ ! -f ~/.config/lh_dontrunmythfrontend ]; then msg "Starting MythFrontend..." $STARTCMD 2>&1 & diff --git a/linhes/linhes-system/linhes-profile.sh b/linhes/linhes-system/linhes-profile.sh index df98315..f558673 100644 --- a/linhes/linhes-system/linhes-profile.sh +++ b/linhes/linhes-system/linhes-profile.sh @@ -5,7 +5,7 @@ export MYTHTV_AIRPLAY="1" if [ -f /etc/systemconfig ]; then SystemType=$(grep SystemType= /etc/systemconfig | cut -d '"' -f 2) fi -if [ ! $SystemType = "FrontendOnly" ]; then +if [[ ! $SystemType == *"Only" ]]; then if [ x$MYTH_RUN_STATUS = x ]; then MYTHCONFDIR=/usr/share/mythtv /usr/bin/lh_myth_status.py fi |
