add some logging
This commit is contained in:
12
functions.sh
12
functions.sh
@@ -1,4 +1,16 @@
|
||||
#/home/usera/functions.sh
|
||||
|
||||
function mylog {
|
||||
code=$1
|
||||
message=$2
|
||||
if [ $code -eq 0 ] ; then
|
||||
code="info"
|
||||
else
|
||||
code="error"
|
||||
fi
|
||||
logger -p local1.$code "$message"
|
||||
}
|
||||
|
||||
function myerror {
|
||||
code=$1
|
||||
shift
|
||||
|
||||
Reference in New Issue
Block a user