aboutsummaryrefslogtreecommitdiffstats
path: root/dcae-controller-service-docker/dcae-controller-service-docker-host/dcae-controller-service-docker-host-manager/src/main/server/bin/common.funcs
blob: 1386d9238231c7eca624a020e0974009e8366e53 (plain)
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
#
# common shell functions 
#

_die() {
    printf "$(date):FATAL:$1\n"
    exit 2;
}

_fail() {
    _die $1;
}

_fail_with_rc() {
    rc=$1
    shift;
    printf "$(date):ERROR:$@\n";
    exit $rc;
}

_warn() {
    printf "$(date):WARN:$1\n";
}

_info() {
    printf "$(date):INFO:$1\n";
}

_print() {
    _info $1;
}