aboutsummaryrefslogtreecommitdiff
path: root/bin/ak-zblock-cache
diff options
context:
space:
mode:
Diffstat (limited to 'bin/ak-zblock-cache')
-rwxr-xr-xbin/ak-zblock-cache14
1 files changed, 7 insertions, 7 deletions
diff --git a/bin/ak-zblock-cache b/bin/ak-zblock-cache
index f1a1c2b..ca4f736 100755
--- a/bin/ak-zblock-cache
+++ b/bin/ak-zblock-cache
@@ -1,7 +1,7 @@
#!/bin/bash
PROGRAM="$(basename $0)"
logit(){
- ak-logthis "<$PROGRAM>" "$1" "$2"
+ ak-logthis "$PROGRAM" "$1" "$2"
}
if [ ! -d "$AK_CACHEDIR/fzblocks" ]
@@ -15,16 +15,16 @@ then
then
if [ "$(sha512sum $AK_ZBLOCKDIR/$1 | awk '{ print $1 }')" == "$(ak-zblock-show $1 | sha512sum | awk '{ print $1 }')" ]
then
- logit "[INFO]" "Cache already there and updated"
+ logit "INFO" "Cache already there and updated"
else
- logit "[INFO]" "Updating cache"
+ logit "INFO" "Updating cache"
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
fi
- logit "[INFO]" "No cache found. Caching..."
+ logit "INFO" "No cache found. Caching..."
ak-zblock-show "$1"
if [ "$?" -ne "0" ]
then
- logit "[ERROR]" "ak-zblock-show failed..."
+ logit "ERROR" "ak-zblock-show failed..."
exit 2
fi
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
@@ -32,10 +32,10 @@ then
ak-zblock-show "$1" > $AK_CACHEDIR/fzblocks/$1
if [ "$?" -ne "0" ]
then
- logit "[ERROR]" "ak-zblock-show failed..."
+ logit "ERROR" "ak-zblock-show failed..."
exit 2
fi
- logit "[ERROR]" "Could not find zblock $1..."
+ logit "ERROR" "Could not find zblock $1..."
exit 1
fi
exit 0