From a14132fe3d1ec05b95ba9f695d8da502f5e653c9 Mon Sep 17 00:00:00 2001 From: Britney Fransen Date: Mon, 26 Dec 2022 00:40:39 -0500 Subject: linhes-system: lh_home_check.sh: initial inclusion --- linhes/linhes-system/PKGBUILD | 5 +++-- linhes/linhes-system/lh_home_check.sh | 9 +++++++++ 2 files changed, 12 insertions(+), 2 deletions(-) create mode 100755 linhes/linhes-system/lh_home_check.sh diff --git a/linhes/linhes-system/PKGBUILD b/linhes/linhes-system/PKGBUILD index 523c2c7..2bea155 100755 --- a/linhes/linhes-system/PKGBUILD +++ b/linhes/linhes-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=linhes-system pkgver=9.0.0 -pkgrel=14 +pkgrel=15 arch=('x86_64') #install=$pkgname.install pkgdesc="Everything that makes LinHES a system" @@ -9,7 +9,7 @@ depends=('cronie' 'dbus-python' 'kdialog' 'libnotify' 'linhes-templates' 'pacman '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 lh_notify-send - jobqueue_helper.py + lh_home_check.sh jobqueue_helper.py diskspace.sh find_orphans.py optimize_mythdb.py create_media_dirs.sh be_check.py myth2mkv myth2mp3" @@ -29,6 +29,7 @@ sha256sums=('7f91d2afcb76e8e9063c6bbe05f5c3d134a6f67541aead8894d342c32d34ad98' '23358a7bff4968eccd469613b81b1415c2ae0ebe77f14f74426697333e4d88d7' '6bce0900dbf8da65fc9be754bff793299bfb35e75a7deb187a17856bd49a4389' '6d4fb0ed1a5ed961b3a3884dce093118e50c2981a9cd5837d20abc5a6d4fd8aa' + '87875d9e5f5ce18208f419698ce69b6bcbcd08955a57a4a13940e715af58b787' '91bdec992bb2c933e15625c181f2195c402060b879168ebf35944cb064c904b9' 'ebdb3ee0212e0cc72526bb5e50a032573e1894acb7bf75617243b0b49aa1f8f2' '4d006f0fe3b13e67de1b961d611e81911905a30d140849dfdb8e5c0dc4da2f7c' diff --git a/linhes/linhes-system/lh_home_check.sh b/linhes/linhes-system/lh_home_check.sh new file mode 100755 index 0000000..de4e089 --- /dev/null +++ b/linhes/linhes-system/lh_home_check.sh @@ -0,0 +1,9 @@ +#!/bin/bash + +#Detect the name of the display in use +display=":$(ls /tmp/.X11-unix/* | sed 's#/tmp/.X11-unix/X##' | head -n 1)" + +#Detect the user using such display +user=$(who | grep '('$display')' | awk '{print $1}' | head -n 1) + +echo /home/$user -- cgit v0.12