From 406a7314ee698d4d978e6048e19f3e98c3e890d0 Mon Sep 17 00:00:00 2001
From: t3chn0m4g3 <t3chn0m4g3@gmail.com>
Date: Thu, 7 Dec 2023 18:44:24 +0100
Subject: [PATCH] fix logrotate config, fix version

---
 docker/tpotinit/dist/bin/clean.sh  | 4 ++--
 docker/tpotinit/dist/entrypoint.sh | 5 ++---
 2 files changed, 4 insertions(+), 5 deletions(-)

diff --git a/docker/tpotinit/dist/bin/clean.sh b/docker/tpotinit/dist/bin/clean.sh
index ba82b29c..c9e6cb44 100755
--- a/docker/tpotinit/dist/bin/clean.sh
+++ b/docker/tpotinit/dist/bin/clean.sh
@@ -20,8 +20,8 @@ echo $(ls $myFOLDER | wc -l)
 
 # Let's create a function to rotate and compress logs
 fuLOGROTATE () {
-  local mySTATUS="/data/tpot/etc/logrotate/status"
-  local myCONF="/data/tpot/etc/logrotate/logrotate.conf"
+  local mySTATUS="/opt/tpot/etc/logrotate/status"
+  local myCONF="/opt/tpot/etc/logrotate/logrotate.conf"
   local myADBHONEYTGZ="/data/adbhoney/downloads.tgz"
   local myADBHONEYDL="/data/adbhoney/downloads/"
   local myCOWRIETTYLOGS="/data/cowrie/log/tty/"
diff --git a/docker/tpotinit/dist/entrypoint.sh b/docker/tpotinit/dist/entrypoint.sh
index 0e659db7..ce551a46 100755
--- a/docker/tpotinit/dist/entrypoint.sh
+++ b/docker/tpotinit/dist/entrypoint.sh
@@ -1,6 +1,5 @@
 #!/bin/bash
 
-VERSION="T-Pot $(cat /opt/tpot/version)"
 COMPOSE="/tmp/tpot/docker-compose.yml"
 
 # Check for compatible OSType
@@ -23,7 +22,7 @@ fi
 if [ -f "/data/uuid" ];
   then
     figlet "Initializing ..."
-    figlet "${VERSION}"
+    figlet "T-Pot: ${TPOT_VERSION}"
     echo
     echo "# Data folder is present, just cleaning up, please be patient ..."
     echo
@@ -31,7 +30,7 @@ if [ -f "/data/uuid" ];
     echo
   else
     figlet "Setting up ..."
-    figlet "${VERSION}"
+    figlet "T-Pot: ${TPOT_VERSION}"
     echo
     echo "# Checking for default user."
     if [ "${WEB_USER}" == "change:me" ];