blob: 024f9d2340f1f56c626ddf046d4fdf6a2524bd0b (
plain)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
|
#!/bin/bash
TS="$(date -u +%s)"
if [ ! -z "$1" ]
then
if [ ! -z "$2" ]
then
if [ ! -z "$3" ]
then
echo "$TS" "$1" "$2" "$3" >> $AK_LOGSFILE
exit 0
else
echo "$TS" "$1" "[ERROR]" "No message" >> $AK_LOGSFILE
exit 1
fi
else
echo "$TS" "$1" "[ERROR]" "No type and message" >> $AK_LOGSFILE
exit 1
fi
else
echo "$TS" "<$(basename $0)>" "[ERROR]" "No arguments given" >> $AK_LOGSFILE
exit 1
fi
|