mirror/update-raid-progress.sh

6 lines
275 B
Bash
Raw Normal View History

2021-09-09 00:11:58 -04:00
#!/bin/sh
cd ~mirror
PROG=`/opt/MegaCli/MegaCli64 -ldrecon -showprog -l1 -a0 | grep Completed |sed 's/.*Completed \([0-9]*\)%.*/\1/'`
sed -i "s/<div id=\"raid-progress\">.*<\/div>/<div id=\"raid-progress\">Reconstruction of the RAID has completed $PROG%<\/div>/" index.html