summaryrefslogtreecommitdiffstats
path: root/linhes/linhes-system
diff options
context:
space:
mode:
Diffstat (limited to 'linhes/linhes-system')
-rwxr-xr-xlinhes/linhes-system/PKGBUILD12
-rwxr-xr-xlinhes/linhes-system/balance_storage_groups.py2
-rwxr-xr-xlinhes/linhes-system/empty_storage_groups.py4
-rwxr-xr-xlinhes/linhes-system/lh_apply_UI_settings.sh9
-rwxr-xr-xlinhes/linhes-system/lh_myth_status.py72
-rw-r--r--linhes/linhes-system/lh_sqlserver.cnf15
6 files changed, 25 insertions, 89 deletions
diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD
index b86b1f8..96121e2 100755
--- a/linhes/linhes-system/PKGBUILD
+++ b/linhes/linhes-system/PKGBUILD
@@ -1,6 +1,6 @@
pkgname=linhes-system
pkgver=9.0.0
-pkgrel=89
+pkgrel=93
arch=('x86_64')
#install=$pkgname.install
pkgdesc="Everything that makes LinHES a system"
@@ -27,8 +27,8 @@ source=($binfiles
'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'
+ '8ae6de3d0ff8e777aeea56f74f38676080142148ac3a32f828462d85c39e7cf7'
+ 'bf72f364dfd6a694774ae0c998a737bf551057a2b3b427f58418854d3e9c785b'
'ff261f41efec8a9963f9f59100cbe75f015028a2ed3a863ce0cb473f2ebb7b76'
'8b54c31b8efde3917f603c5307bebb0a2a00239ad9a983c2f5d8120003256449'
'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27'
@@ -36,7 +36,7 @@ sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0'
'fbd1640106b3d9356452625753a6f1974e0be905b9f4732a1287b3905806cba8'
'1c36e4fdf41c1063e0a127ce4a90fbdef19879c381a87f622d7399ca931560cc'
'87875d9e5f5ce18208f419698ce69b6bcbcd08955a57a4a13940e715af58b787'
- '93d664f4a46fda05d0f754d19df40cbda120e325b80c07092345b14763993833'
+ '192bfff1b8d46e0ebb969618847d9993aba3b1b578053c8d701dad9f9e758f86'
'a523388ffdc6f30f2dd2ef4803b21bded8a35bfded499dc66b786adec71840a3'
'6ea7f807a29631e33629da14e7ca6481310f0416c5d6f8fb415a76fa90fb9b76'
'91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9'
@@ -47,7 +47,7 @@ sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0'
'cd3306991c8b63f5402c0e52405cc1a6581cb3c42af74b7c2f879c8192f95610'
'e371c6a289c68fe200d7da856c20a8c579efa23178f4d62235f7359d7f6e49a1'
'ee9a4df83e463e0c8a2e862680a83cff07a36cf3606faf60f57bc11190ffb1c9'
- '7b39ddc6ec31322c679a15349a567e4fae5c808769443b7bf4a4d8ee882259e6'
+ 'f051f5111238f6f391108e68071ab02f200cfc6c4d2e34ae98f7a29057dbdf75'
'd2d69b2bf6315bd37ff5f5b2f0cde8ab2fb89bae18f8796dc5208ffc1a9d743e'
'a745356952470a5d718bef1961309ea30e4fa6a2860961cd52e09d6ec11e708e'
'1819085bd2c9106482c5f243b95fddf3dae69212330ab76cb493add5c26a45a4'
@@ -81,7 +81,7 @@ sha256sums=('e6eaa2fb4819fa60cb05b4d2e7328d2914af3a73028a735ec4d56e7ece33ecc0'
'dae799f09a076e0f573ea516bc357f56f2fd3aa8e35ec0cf54b6b62282960ee0'
'aa1d831f25317a9cb8d7e9a7d7b6d51c8d03bd5b69f3bec27bea7644ca38fe9a'
'cf884bad5caab9d5901b88b0ef41e3a39ea0b7a4614b8d14707d79941c899cbf'
- '3ed91fb5a7894f82fb4895e06d2e3f1df3ac4f82e46c970d4a85aaa4edc24cf1'
+ '01416dadeb34ca8b18bb7326113672b3888b16a60133d501d48610d23b74d1eb'
'197ff4bb3c1cafcb197268cac335f1f75ae26873aca5833d62cc51fade85176c'
'0b9868a563036c81f8fdb8ab8bbad51934aca2a07e9d7634e24214791afda8e2'
'1b965b5e7eeafdf3815c8f2722587a560693dd780327cca9910dc47fba0f1aef'
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..c181242 100755
--- a/linhes/linhes-system/empty_storage_groups.py
+++ b/linhes/linhes-system/empty_storage_groups.py
@@ -101,7 +101,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 +114,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)
diff --git a/linhes/linhes-system/lh_apply_UI_settings.sh b/linhes/linhes-system/lh_apply_UI_settings.sh
index e49d98f..442a15f 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
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,