diff options
author | Britney Fransen <brfransen@gmail.com> | 2022-11-30 23:10:41 (GMT) |
---|---|---|
committer | Britney Fransen <brfransen@gmail.com> | 2022-11-30 23:10:41 (GMT) |
commit | 09c491757cc31cc4b44967f4df50b56a06b218c3 (patch) | |
tree | c4402c13e403c4c232dedaf4db576f004495a736 /linhes/linhes-system | |
parent | 0e927ab4c2948429c71c22200da0e760b766102f (diff) | |
download | linhes_pkgbuild-09c491757cc31cc4b44967f4df50b56a06b218c3.zip linhes_pkgbuild-09c491757cc31cc4b44967f4df50b56a06b218c3.tar.gz linhes_pkgbuild-09c491757cc31cc4b44967f4df50b56a06b218c3.tar.bz2 |
linhes-dev: mp.py: use updpkgsums to replace sums
Diffstat (limited to 'linhes/linhes-system')
-rwxr-xr-x | linhes/linhes-system/PKGBUILD | 17 | ||||
-rwxr-xr-x | linhes/linhes-system/diskspace.sh | 2 | ||||
-rwxr-xr-x | linhes/linhes-system/lh_system_start.sh | 64 | ||||
-rw-r--r-- | linhes/linhes-system/linhes-profile.sh | 3 | ||||
-rwxr-xr-x | linhes/linhes-system/optimize_mythdb.py | 16 | ||||
-rw-r--r-- | linhes/linhes-system/x11vnc.override.conf | 10 |
6 files changed, 81 insertions, 31 deletions
diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD index ec03819..c8c960a 100755 --- a/linhes/linhes-system/PKGBUILD +++ b/linhes/linhes-system/PKGBUILD @@ -1,21 +1,21 @@ pkgname=linhes-system pkgver=9.0.0 -pkgrel=3 +pkgrel=4 arch=('x86_64') #install=$pkgname.install pkgdesc="Everything that makes LinHES a system" license=('GPL2') -depends=('cronie' 'libnotify' 'linhes-templates' 'pacman-contrib' 'openssh' 'ttf-overlock') +depends=('cronie' 'dbus-python' 'libnotify' 'linhes-templates' 'pacman-contrib' 'openssh' 'ttf-overlock') 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 jobqueue_helper.py - diskspace.sh find_orphans.py + diskspace.sh find_orphans.py optimize_mythdb.py create_media_dirs.sh be_check.py myth2mkv myth2mp3" source=($binfiles 'myth_mtc.cron' 'paccache.cron' 'xfs_defrag.cron' 'readme_is_xml' 'add_storage.readme' '79-cronie.hook' 'fstrim.hook' 'openssh.hook' - '10-monitor.conf' + '10-monitor.conf' 'x11vnc.override.conf' 'system-sudo.rules' 'lh_system_start.sh.desktop') @@ -34,6 +34,9 @@ package() { #startup files install -D -m600 "$srcdir/lh_system_start.sh.desktop" "$pkgdir/home/mythtv/.config/autostart/lh_system_start.sh.desktop" + #systemd files + install -m644 -D $srcdir/x11vnc.override.conf $pkgdir/etc/systemd/system/x11vnc.service.d/override.conf + #readme files install -m644 -D $srcdir/readme_is_xml $pkgdir/etc/gen_is_xml.d/readme_is_xml install -m644 -D $srcdir/readme_is_xml $pkgdir/etc/gen_lib_xml.d/readme_gen_xml @@ -67,10 +70,11 @@ sha256sums=('96f67b5428debb7dac909893c56a7637bf6545c068732822981d4080125c53d9' '11168c9cd3b117decaab6bc665c183b4aab917cf0a976bce4c1b5e4686a27bc9' 'ae34515e144830f424d3bd3f6b1b446892d62beed20bca6f0fb19b0bbb779f27' '23358a7bff4968eccd469613b81b1415c2ae0ebe77f14f74426697333e4d88d7' - '3d75c92c19da1f21da751f6425d9403eae58a1f5f665b39d72e6d2ff0e9c5494' + '1178b1c9797c50e5808558a2e7c826bbc4243bbf81f09d94d36fa26124f921e0' '91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9' - 'f046b10e9f8686a8f5d1a48220506c0e22cc3b630f787d9f5e6b9044a22e7b26' + 'cedd34e448d3d45ab0f9fff40c115401f45bdea5b99215d0aff514a759ae2b7c' '76f023c0cde7fea269234f1b29c32b117b91769217d4b1b8a3922daceb25f9f8' + 'e371c6a289c68fe200d7da856c20a8c579efa23178f4d62235f7359d7f6e49a1' 'bffcc13e4b480f720feb2b3c781bc4247c63303250c3d885022c699573d45a33' '0254a21644473ba7953501a223f13b9b55d7ec290c80a567724ca1ac13e02e30' '9ea1b5583cd38f53bb79d9e4ccae91a028db0b6850162d7991b19122c564b9c9' @@ -84,5 +88,6 @@ sha256sums=('96f67b5428debb7dac909893c56a7637bf6545c068732822981d4080125c53d9' '4c29e0b71071ae9556cf2dbd75de560d028577fe5eb993113105112c4b445eac' '890482242434e333024c7819e8bf3c889dc16548d0a1745479c8523930fb32f7' 'dead17906b33a7f9d66ad13bb1c083a23438f45ece9bd5ec41ff86eda01c132a' + '2c9152ed542bb9c3aa516c6009125a757065100a060e0fa597243d4cbd92844f' 'a9d0a94ff442453f0bec0b2e8afd591cf17b2845b6ae45ff300530114efd30af' '0b9868a563036c81f8fdb8ab8bbad51934aca2a07e9d7634e24214791afda8e2') diff --git a/linhes/linhes-system/diskspace.sh b/linhes/linhes-system/diskspace.sh index b48f59d..f28cf46 100755 --- a/linhes/linhes-system/diskspace.sh +++ b/linhes/linhes-system/diskspace.sh @@ -15,7 +15,7 @@ DF='/usr/bin/df' GREP='/usr/bin/grep' AWK='/usr/bin/awk' CUT='/usr/bin/cut' -HOSTNAME='/usr/bin/hostname' +HOSTNAME='/usr/bin/hostnamectl hostname' DATE='/usr/bin/date' MSG_CLIENT='/usr/bin/notify-send' diff --git a/linhes/linhes-system/lh_system_start.sh b/linhes/linhes-system/lh_system_start.sh index 6ba1cb0..e3243a5 100755 --- a/linhes/linhes-system/lh_system_start.sh +++ b/linhes/linhes-system/lh_system_start.sh @@ -23,40 +23,55 @@ function applyUIsettings(){ msg "Welcome to LinHES 9!" } -function make_nanorc(){ +function x11vnc_setup(){ + msg "Set x11vnc Password" "Open Konsole run x11vnc -storepasswd" + touch ~/.vnc/x11vnc.log + /usr/bin/systemctl enable --now x11vnc.service +} + +function bashrc_setup(){ + if ! grep -q 'alias rscp=' ~/.bashrc; then + echo -e "\nalias rscp='rsync -a --info=progress2'" >> ~/.bashrc + fi + if ! grep -q 'alias rsmv=' ~/.bashrc; then + echo -e "alias rsmv='rsync -a --info=progress2 --remove-source-files'" >> ~/.bashrc + fi +} + +function nanorc_setup(){ mkdir ~/.config/nano echo -e 'set tabsize 4\nset tabstospaces\ninclude "/usr/share/nano/*.nanrc"' >> ~/.config/nano/nanorc } -function notify_scan(){ - if [ -e /tmp/scan_report ] - then +function storage_scan(){ + if [ -e /tmp/scan_report ]; then msg "New Storage Found" "Run add_storage.py for details." fi } +function install_lh_apps(){ + #install programs that are not needed on the iso + sudo pacman -Syyy firefox glances mythtv ncdu x11vnc +} + function first_configure(){ - echo "First configure..." - if [ ! $SystemType = "Frontend_only" ] - then - if [ ! -f ~/.config/lh_configured ] - then - applyUIsettings - msg "New install of LinHES. Starting setup." + if [ ! -f ~/.config/lh_configured ]; then + #apply settings for all system types + applyUIsettings + msg "New install of LinHES. Starting setup." + nanorc_setup + bashrc_setup + x11vnc_setup + + #apply settings for specific system types + if [ ! $SystemType = "Frontend_only" ]; then # only run mythfilldatabase for masterbackends - if [ $SystemType = "Master_backend" ] - then - #nice -n 19 mythfilldatabase --quiet & - msg "Guide data is being loaded." "Until this completes some shows will appear as unknown in the program guide." - fi - touch ~/.config/lh_configured - fi - else - if [ ! -f ~/.config/lh_configured ] - then - applyUIsettings - touch -f ~/.config/lh_configured + #nice -n 19 mythfilldatabase --quiet & + msg "Guide data is being loaded." "Until this completes some shows will appear as unknown in the program guide." + else + #Frontend_only cmds fi + touch ~/.config/lh_configured fi } @@ -65,4 +80,5 @@ function first_configure(){ #-------MAIN------- first_configure /usr/bin/enableIRWake.sh & -notify_scan +xset -dpms s off +storage_scan diff --git a/linhes/linhes-system/linhes-profile.sh b/linhes/linhes-system/linhes-profile.sh new file mode 100644 index 0000000..00baeac --- /dev/null +++ b/linhes/linhes-system/linhes-profile.sh @@ -0,0 +1,3 @@ +#!/bin/bash +#this enables airplay support +export MYTHTV_AIRPLAY="1" diff --git a/linhes/linhes-system/optimize_mythdb.py b/linhes/linhes-system/optimize_mythdb.py new file mode 100755 index 0000000..7d60e89 --- /dev/null +++ b/linhes/linhes-system/optimize_mythdb.py @@ -0,0 +1,16 @@ +#!/usr/bin/python +# import MySQL module +import MySQLdb +import socket +import sys +db = MySQLdb.connect(host="localhost", user="mythtv", passwd="mythtv", db="mythconverg") +cursor = db.cursor() +cursor.execute("SHOW tables") +result = cursor.fetchall() +ops=["REPAIR","OPTIMIZE","ANALYZE"] +for row in result: + ctable=row[0] + for op in ops: + print(op,ctable) + cmd= "%s table %s" %(op,ctable) + cursor.execute(cmd) diff --git a/linhes/linhes-system/x11vnc.override.conf b/linhes/linhes-system/x11vnc.override.conf new file mode 100644 index 0000000..f79e9c8 --- /dev/null +++ b/linhes/linhes-system/x11vnc.override.conf @@ -0,0 +1,10 @@ +[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 +Restart=on-failure +RestartSec=10 +User=mythtv + +[Install] +WantedBy=graphical.target |