From 9531bcdffff4e44e8aadb000f0b577d59a32ea3f Mon Sep 17 00:00:00 2001 From: kaotisk Date: Sun, 30 Jun 2024 15:59:07 +0300 Subject: removed ak-log-message in favor of ak-log --- bin/ak-log-message | 47 ----------------------------------------------- 1 file changed, 47 deletions(-) delete mode 100755 bin/ak-log-message (limited to 'bin') diff --git a/bin/ak-log-message b/bin/ak-log-message deleted file mode 100755 index b225313..0000000 --- a/bin/ak-log-message +++ /dev/null @@ -1,47 +0,0 @@ -#!/bin/bash -PROGRAM="$(basename $0)" -TS="$(date -u +%s)" -if [ ! -z $1 ] && [ -n "$1" ] -then - if [ "$1" == "-h" ] || [ "$1" == "--help" ] - then - echo "$PROGRAM - Log events" - echo "-h, --help Prints this message" - echo " Logs this message" - exit 0 - fi - if [ ! -z "$2" ] && [ -n "$2" ] - then - if [ ! -z "$3" ] && [ -n "$3" ] - then - echo "$TS" "<$1>" "[$2]" "$3" >> $AK_LOGSFILE - if [ "$AK_DEBUG" == "yes" ] - then - echo "$TS" "<$1>" "[$2]" "$3" >&2 - fi - exit 0 - else - echo "$TS" "<$1>" "[ERROR]" "No message" >> $AK_LOGSFILE - if [ "$AK_DEBUG" == "yes" ] - then - echo "$TS" "<$1>" "[ERROR]" "No message" >&2 - fi - exit 1 - fi - else - echo "$TS" "<$1>" "[ERROR]" "No type and message" >> $AK_LOGSFILE - if [ "$AK_DEBUG" == "yes" ] - then - echo "$TS" "<$1>" "[ERROR]" "No type and message" >&2 - fi - exit 1 - fi -else - echo "$TS" "<$(basename $0)>" "[ERROR]" "No arguments given" >> $AK_LOGSFILE - if [ "$AK_DEBUG" == "yes" ] - then - echo "$TS" "<$(basename $0)>" "[ERROR]" "No arguments given" >&2 - fi - exit 1 -fi - -- cgit v1.2.3