diff --git a/scripts/run.bash b/scripts/run.bash
index 37389ece0ab8bd17df779eecfe98d19951a2854f..c775338efd53951ad9976a9b3ad9901a2ca134f5 100755
--- a/scripts/run.bash
+++ b/scripts/run.bash
@@ -23,15 +23,26 @@ if [ $? -eq 0 ]; then
 fi
 echo -e "\nPython script ended"
 
+# Check if bash.log is becoming too large
+linecount=$(wc -l < bash.log)
+
+if [[ $linecount -ge 3000 ]] ; then
+    # delete the first linecount - 3000 lines
+    delete_lines=$(($linecount-3000))
+    sed -i "1,${delete_lines}d" bash.log
+fi
+
 git pull
 
-last_commit_name = $(git log -1 --pretty=%B | cat)
+last_commit_name=$(git log -1 --pretty=%B | cat)
 
-if [[ $string == *"New data"* ]]; then
+if [[ $last_commit_name == "New data" ]]
+then
     # check if the last commit was "New data"
     # if yes overwrite the commit
     git reset --soft HEAD~1
 fi
+sudo shutdown +5761
 
 git add .
 git commit -m "New data" && git push --force
\ No newline at end of file
diff --git a/scripts/serial_id.py b/scripts/serial_id.py
index aa610052304db785e0f14956634d501bc8af71a6..f2b1e309b46cd2b6d1f1dc1833c8d5c909cda0d7 100644
--- a/scripts/serial_id.py
+++ b/scripts/serial_id.py
@@ -1,4 +1,4 @@
-"""Return the id of the arduino connected to the first serial port. id 0 is for Temperaturmessung, id 1 for DMSMessung
+"""Return the id of the arduino connected to the first serial port. Id 1 is for DMSMessung, id 2 for Temperaturmessung.
 """
 import time
 import serial