diff options
Diffstat (limited to 'abs')
-rwxr-xr-x | abs/core/LinHES-system/PKGBUILD | 6 | ||||
-rwxr-xr-x | abs/core/LinHES-system/diskspace.sh | 13 | ||||
-rwxr-xr-x | abs/core/LinHES-system/msg_client.py | 20 |
3 files changed, 15 insertions, 24 deletions
diff --git a/abs/core/LinHES-system/PKGBUILD b/abs/core/LinHES-system/PKGBUILD index 94b94fb..9abf04a 100755 --- a/abs/core/LinHES-system/PKGBUILD +++ b/abs/core/LinHES-system/PKGBUILD @@ -1,6 +1,6 @@ pkgname=LinHES-system pkgver=8.0 -pkgrel=10 +pkgrel=11 arch=('i686' 'x86_64') install=system.install pkgdesc="Everything that makes LinHES an automated system" @@ -92,12 +92,12 @@ md5sums=('8fc4b7c1ddf8f3c4d2266ce55086b4d4' '1be1d3dfc83f828eede93055713882ae' '47e093e8cfe4b5b96602358e1f540832' 'a8e486f5d23913242b6edb862bf44c0e' - 'b9b0a8370f46f0b5e144a66897e8eefb' + '7bd8c0e96631be95086621b1d818aa95' '6519d209e151cdc39ae7e1091d189c3e' '8f474e019d5fcb775497aca355d61b0b' '4a3cd8f9b33b2b86fdba47a8f1fa2859' '16f079dab35dde6efd55bf6cf4e2fb2f' - '0e76cd8f320a852a162931450a1fb8b7' + '4abc4780fa78ed40c07401b3cd25209b' '645297f5905e87eb99999d5a0f3f069a' 'ea315f41dcd6c978e546c95fc05546cf' 'ac61cc460d9e97ba1f5ef69e92cdfbe5' diff --git a/abs/core/LinHES-system/diskspace.sh b/abs/core/LinHES-system/diskspace.sh index 635a972..d27221a 100755 --- a/abs/core/LinHES-system/diskspace.sh +++ b/abs/core/LinHES-system/diskspace.sh @@ -16,7 +16,6 @@ AWK='/usr/bin/awk' CUT='/usr/bin/cut' HOSTNAME='/usr/bin/hostname' DATE='/bin/date' -OSD_CAT='/usr/bin/osd_cat' MSG_CLIENT='/usr/LH/bin/msg_client.py --msg' export DISPLAY=:0.0 # @@ -40,17 +39,6 @@ for ARG in "$@" ; do esac done -#---------------------------------------------------------------------------- -. /etc/osd_cat.cfg || { - color=yellow - outline=2 - outlinecolour=black - shadow=0 - shadowcolour=black - font="-adobe-helvetica-bold-*-*-*-34-*-*-*-*-*-*-*" -} -#---------------------------------------------------------------------------- - [ $VERBOSE = true ] && echo "Checking free disk space on ${THIS_HOST}" [ $VERBOSE = true ] && echo "Threshold for warning is ${ALERT}%" [ $VERBOSE = true ] && echo "------------------------------------------------------------------" @@ -73,7 +61,6 @@ $DF -HPl | $GREP -E "^/dev/" | $AWK '{ print $5 " " $6 " " $1 }' | while read OU else echo "WARNING: ${PARTITION} (${DEVICE}) is ${USED_PCENT}% full on ${THIS_HOST}." #| if [ $OSD = true ] && [ ${PARTITION} = / ]; then - #echo "WARNING: The root (${PARTITION}) partition is ${USED_PCENT}% full on ${THIS_HOST}." | $OSD_CAT --pos=top --offset=40 --align=center --delay=10 --color=$color --outline=$outline --outlinecolour=$outlinecolour --shadow=$shadow --shadowcolour=$shadowcolour --font=$font & $MSG_CLIENT "WARNING: The root (${PARTITION}) partition is ${USED_PCENT}% full on ${THIS_HOST}." fi fi diff --git a/abs/core/LinHES-system/msg_client.py b/abs/core/LinHES-system/msg_client.py index 54c2e54..8c5e3c4 100755 --- a/abs/core/LinHES-system/msg_client.py +++ b/abs/core/LinHES-system/msg_client.py @@ -33,8 +33,8 @@ def send_message(message): def usage(): line = ''' Help screen: - msg_client.py is used to add,remove, or list items in the queue of messages that - will be displayed on screen. Optionaly messages can be given an identifier or "tag". + msg_client.py is used to add, remove, or list items in the queue of messages that + will be displayed on screen. Optionally messages can be given an identifier or "tag". This identifier does not have to be unique. Items are processed in the order they arrive, based off their slot number. @@ -43,19 +43,23 @@ def usage(): ADD: - To add items to the queue: - msg_client.py --msg "My first message" --tag "tag1" + To add items to the queue: + msg_client.py --msg "My first message" --tag "tag1" + + To add a message with a line break use \\n: + msg_client.py --msg "My first\\nmessage" --tag "tag1" + REMOVE: Removing items are based off the tag. To remove all items from the queue that match the tag "tag1": - msg_client.py --clear --tag tag1 + msg_client.py --clear --tag "tag1" To remove all items from the queue: - msg_client.py --clear + msg_client.py --clear - Listing items in the queue or to get the total count: + Listing items in the queue or to get the total item count: msg_client.py --print_list > ------------- > msg : slot 1 @@ -75,7 +79,7 @@ if __name__ == "__main__": parser = argparse.ArgumentParser() parser.add_argument('--tag', action='store', dest='tag',help='message tag') - parser.add_argument('--timeout', action='store', dest='timeout',help='time to display message') + parser.add_argument('--timeout', action='store', dest='timeout',help='time to display message in seconds') action = parser.add_mutually_exclusive_group(required=True) action.add_argument('--msg', action='store', dest='msg', help='Add message to the queue') action.add_argument('--clear', action='store_true', help='Remove message from queue that match tag') |