23 lines
698 B
Bash
23 lines
698 B
Bash
#!/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
|