Drag-NDrop / IdleRunner

For running and stopping ressource consumption tools, depending on all users interactive usage-status of the system.
GNU General Public License v3.0
30 stars 2 forks source link

Activity file is not recreated on restart #3

Closed ask6483 closed 7 months ago

ask6483 commented 9 months ago
../IdleRunner.sh: line 49: /tmp/IdleRunnerActivityTracker.log: No such file or directory

bashrc function is redirecting timestamp echo to not existing file after restart.

ask6483 commented 9 months ago

Fix:

Update_ActivityLog_And_Run_IdleRunner() {
   local timestamp=$(date '+%F %T')
   local activityfile="/tmp/IdleRunnerActivityTracker.log"
   [ -f $activityfile ] || touch $activityfile
   echo "$timestamp" > "/tmp/IdleRunnerActivityTracker.log"
   /home/ubuntu/IdleRunner/IdleRunner.sh > /dev/null
 }   
PROMPT_COMMAND="Update_ActivityLog_And_Run_IdleRunner"
Codycody31 commented 9 months ago

My branch should fix this issue. Though I'll have to do a quick test later to make sure (once I get my dev env setup)

Codycody31 commented 7 months ago

Should be fixed in recent PR that was merged