-
Notifications
You must be signed in to change notification settings - Fork 1
Expand file tree
/
Copy pathsubmit.sh
More file actions
executable file
·45 lines (45 loc) · 1018 Bytes
/
submit.sh
File metadata and controls
executable file
·45 lines (45 loc) · 1018 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
#!/bin/bash
#
source /var/scripts/variables.txt
if (( $(cat $short_report | wc -l)>1 ))
then
echo
echo
echo "You already submitted your test before, you will have to start over again"
echo
echo "Would you like to start over again?"
while :
do
echo
echo "Please type \"yes\" or \"no\" "
echo
read answer
if [[ $answer == "yes" ]]
then
echo
echo
echo "Restoring your box"
disaster.sh
echo
echo "Your box is restored to the original state"
echo
echo "Run start.sh script again and you can start on your test again"
echo
echo
break
elif [[ $answer == "no" ]]
then
echo
echo
echo "OK, not touching anything!"
echo
echo
break
fi
done
else
echo
echo
echo "Checking your test"
freedom.sh 2>/dev/null
fi