Subversion Repositories programming

Rev

Rev 193 | Rev 283 | Go to most recent revision | Show entire file | Ignore whitespace | Details | Blame | Last modification | View Log | RSS feed

Rev 193 Rev 241
Line 9... Line 9...
9
 
9
 
10
################################################################################
10
################################################################################
11
###                            Config Options                                ###
11
###                            Config Options                                ###
12
################################################################################
12
################################################################################
13
 
13
 
-
 
14
TMPFILE="$(mktemp)" || echo "Failed to create tempfile" && exit 1
14
EMAIL_ADDR="ira@irasnyder.com"
15
EMAIL_ADDR="ira@irasnyder.com"
15
EMAIL_FILE="/root/raid_checker.txt"
16
EMAIL_FILE="${TMPFILE}"
16
RAID_DEVICE="/dev/md0"
17
RAID_DEVICE="/dev/md0"
17
RAID_DRIVES="/dev/sd[abcdefgh]"
18
RAID_DRIVES="/dev/sd[abcdefgh]"
18
 
19
 
19
################################################################################
20
################################################################################
20
###                            Functions                                     ###
21
###                            Functions                                     ###
21
################################################################################
22
################################################################################
22
 
23
 
23
# Anything that needs to be run before the main program starts
24
# Anything that needs to be run before the main program starts
24
# goes in this function
25
# goes in this function
25
pre_startup() {
26
pre_startup() {
26
    if [ -f "$EMAIL_FILE" ]; then
-
 
27
        echo "Necessary file exists: $EMAIL_FILE";
-
 
28
        echo "Delete it then run me again";
-
 
29
        exit 1
-
 
30
    fi
-
 
31
}
27
}
32
 
28
 
33
# Anything that needs to be run after the main program finishes
29
# Anything that needs to be run after the main program finishes
34
# goes in this function
30
# goes in this function
35
clean_up() {
31
clean_up() {