Initial set of scripts
This commit is contained in:
28
Bash Scripts/ddstatus.sh
Executable file
28
Bash Scripts/ddstatus.sh
Executable file
@@ -0,0 +1,28 @@
|
||||
#!/bin/bash
|
||||
|
||||
|
||||
PID=$(pidof dd)
|
||||
|
||||
|
||||
main(){
|
||||
|
||||
while true;do
|
||||
clear
|
||||
if [ ! ${PID} ];then
|
||||
echo "DD is not running"
|
||||
exit 0;
|
||||
elif [[ ${PID} ]];then
|
||||
kill -USR1 ${PID} > /dev/null
|
||||
sleep 1
|
||||
if [[ ! ${PID} ]];then
|
||||
echo "dd it no longer running"
|
||||
exit 0;
|
||||
fi
|
||||
else
|
||||
echo "There was an unknown error, exiting..."
|
||||
exit 0;
|
||||
fi
|
||||
done
|
||||
}
|
||||
|
||||
main
|
||||
Reference in New Issue
Block a user