IPP Software Navigation Tools IPP Links Communication Pan-STARRS Links

Changeset 28616


Ignore:
Timestamp:
Jul 6, 2010, 1:49:58 PM (16 years ago)
Author:
Serge CHASTEL
Message:

Deletion parameters are now in site.php.in + doc

Location:
trunk/ippMonitor
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • trunk/ippMonitor/def/README

    r28615 r28616  
    173173To avoid this problem, the function delete_old_tmp_files() in ipp.php
    174174was created. It checks the /tmp directory and removes all files
    175 belonging to the apache user and that are older than 15 minutes.
    176 delete_old_tmp_files() is called at the beginning of the
    177 autocodeImage.php template script (line 4) and is therefore present in
    178 all generated plotting scripts.
     175belonging to the $DELETION_USER user and that are older than
     176$DELETION_DELAY minutes. delete_old_tmp_files() is called at the
     177beginning of the autocodeImage.php template script (line 4) and is
     178therefore present in all generated plotting scripts.
     179
     180$DELETION_USER and $DELETION_DELAY are defined in site.php.in (values
     181are 'apache' and '15').
  • trunk/ippMonitor/raw/ipp.php

    r28614 r28616  
    879879//
    880880function 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);
     881  global $DELETION_USER;    // defined in raw/site.php.in
     882  global $DELETION_DELAY;   // defined in raw/site.php.in
     883  exec("find /tmp -user $DELETION_USER -amin +$DELETION_DELAY", $output, $status);
    884884  foreach ($output as $key => $value) {
    885885    exec("rm -f $value");
  • trunk/ippMonitor/raw/site.php.in

    r28043 r28616  
    1515
    1616$DBI     = "@DBI@";
     17
     18// Temporary files belonging to DELETION_USER and older than
     19// DELETION_DELAY minutes will be delayed by the
     20// delete_old_tmp_files() function (see raw/ipp.php)
     21$DELETION_USER  = "apache";
     22$DELETION_DELAY = 15;
    1723?>
Note: See TracChangeset for help on using the changeset viewer.