aboutsummaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rwxr-xr-xapkg3
1 files changed, 2 insertions, 1 deletions
diff --git a/apkg b/apkg
index 4e7c863..6574d1f 100755
--- a/apkg
+++ b/apkg
@@ -865,7 +865,8 @@ APKG_REPO="$PWD"
APKG_PACKAGE_DIR="$PWD"
APKG_SOURCE_DIR="$PWD"
APKG_WORK_DIR="$PWD"
-log_file="$APKG_WORK_DIR"/"$(basename "$0")_$(date +"%Y%m%d_%T")".log
+[!APKG_LOG_DIR] && APK_LOG_DIR="/var/log"
+log_file="$APKG_LOG_DIR"/"$(basename "$0")_$(date +"%Y%m%d_%T")".log
# source config
if [ -f $APKG_CONF ]; then