diff --git a/etc/viewlog b/etc/viewlog index 0f11311..906db12 100755 --- a/etc/viewlog +++ b/etc/viewlog @@ -1,5 +1,7 @@ #!/bin/bash +#this script is executed whenever you click on an entry from the logviewer script. This script handles opening a text editor to view your log file. + DIRECTORY="$(readlink -f "$(dirname "$(dirname "$0")")")" file="$6" diff --git a/manage b/manage index 0cb3322..f3f3bfe 100755 --- a/manage +++ b/manage @@ -24,7 +24,9 @@ rm_esc() { #remove ANSI escape sequences from a given file source "${DIRECTORY}/api" || error "failed to source ${DIRECTORY}/api" -mkdir -p "${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" +mkdir -p "${DIRECTORY}/data/status" "${DIRECTORY}/data/update-status" "${DIRECTORY}/logs" +#remove week-old logfiles +find "$DIRECTORY/logs" -type f -mtime +7 -exec rm -f {} \; &>/dev/null & #determine if host system is 64 bit arm64 or 32 bit armhf if [ ! -z "$(file "$(readlink -f "/sbin/init")" | grep 64)" ];then