IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28614


Ignore:
Timestamp:
Jul 6, 2010, 11:28:57 AM (16 years ago)
Author:
Serge CHASTEL
Message:

Bug fix for tmp files deletion

Location:
trunk/ippMonitor
Files:
2 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/def/autocodeImage.php

    r28613 r28614  
    22
    33include 'ipp.php';
     4delete_old_tmp_files();
    45
    56$ID = checkID ();
     
    159160menu_end();
    160161
    161 unlink($datFilename);
    162 unlink($pngFilename);
    163 
    164162?>
  • trunk/ippMonitor/raw/ipp.php

    r28601 r28614  
    875875$filteringParameters = array();
    876876
     877//
     878// Delete temporary files if they are older than $expire_time minutes
     879//
     880function delete_old_tmp_files() {
     881  // define after how many minutes the files should be deleted
     882  $expire_time = 15;
     883  exec("find /tmp -user apache -amin +$expire_time", $output, $status);
     884  foreach ($output as $key => $value) {
     885    exec("rm -f $value");
     886    $count++;
     887  }
     888}
     889
    877890?>
Note: See TracChangeset for help on using the changeset viewer.