Initial commit
This commit is contained in:
22
customcd/files/root/rescuebru/showcapacitywindow.sh
Normal file
22
customcd/files/root/rescuebru/showcapacitywindow.sh
Normal file
@@ -0,0 +1,22 @@
|
||||
#!/bin/bash
|
||||
# showcapacitywindow.sh
|
||||
# Rescue CD Backup & Restore Utility capacity window display
|
||||
# version 7.2.5
|
||||
# Rod Wright 1/19/2024
|
||||
# Refer to CHANGELOG file for details.
|
||||
# -----------------------------------------------------------------------------
|
||||
|
||||
CAPACITY_FILE="/root/capacity.txt"
|
||||
|
||||
if ps ax|grep rbruserver|grep -vq grep; then
|
||||
windowtitle="RAID Capacity"
|
||||
else
|
||||
windowtitle="Media Capacity"
|
||||
fi
|
||||
while true ; do
|
||||
if ! ps ax| grep "watch -t -n1"|grep -q $CAPACITY_FILE ; then
|
||||
xfce4-terminal --disable-server --hide-menubar --hide-toolbar --title="$windowtitle" --geometry=25x4+2000+0 -e "watch -t -n1 'cat $CAPACITY_FILE'"
|
||||
echo $! >$PID_FILE
|
||||
fi
|
||||
sleep 2
|
||||
done
|
||||
Reference in New Issue
Block a user