summarylogtreecommitdiffstats
path: root/lazyman.install
blob: feea5079e3858a00c5973a23ce68f8c307cf8f62 (plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
post_install() {
    local site=(powersports.ml freegamez.ga)
    local ip= i=0

    until [[ $ip ]]; do
        ip=$(drill -4 ${site[i]} @1.1.1.1 A |grep ANSWER -A1 |grep ${site[i]} |cut -dA -f2|sed 's/\t//')
        ((i++))
        if [[ $i -ge 2 ]]; then
            echo " Error resolving hostnames: ${site[@]}"
            exit
        fi
    done

    if [[ ! $(grep "$ip" /etc/hosts) ]]; then
        echo
        echo " You must add the following lines to your /etc/hosts file"
        echo " "$ip" mf.svc.nhl.com"
        echo " "$ip" playback.svcs.mlb.com"
        echo " "$ip" mlb-ws-mf.media.mlb.com"
        echo
    fi
}