Back to index

wims  3.65+svn20090927
Functions
housekeep.c File Reference
This graph shows which files directly or indirectly include this file:

Go to the source code of this file.

Functions

void housekeep (void)
void modupdate (void)
void backup (void)

Function Documentation

void backup ( void  )

Definition at line 59 of file housekeep.c.

{
    FILE *backlog;
    
    if(strncmp(backdate,nowstr,8)==0) return;
    backlog=fopen("backup/backdate","r");
    if(backlog==NULL) goto dobackup;
    fread(backdate,8,1,backlog); backdate[8]=0; fclose(backlog);
    if(strncmp(backdate,nowstr,8)==0) return;
    dobackup:
    call_ssh(0,"bin/backup &>%s/backup.log",tmpd);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void housekeep ( void  )

Definition at line 19 of file housekeep.c.

{
    char fname[1024];
    FILE *keeplog;
    
    if(strncmp(keepdate,nowstr,8)==0) return;
    snprintf(fname,sizeof(fname),"%s/keepdate",tmpd);
    keeplog=fopen(fname,"r");
    if(keeplog==NULL) goto dokeep;
    fread(keepdate,8,1,keeplog); keepdate[8]=0; fclose(keeplog);
    if(strncmp(keepdate,nowstr,8)==0) return;
    dokeep:
    keeplog=fopen(fname,"w");
    if(keeplog!=NULL) {
       fwrite(nowstr,8,1,keeplog);fclose(keeplog);
    }
    call_ssh(0,"bin/housekeep.daily &>%s/housekeep.log",tmpd);
}

Here is the call graph for this function:

Here is the caller graph for this function:

void modupdate ( void  )

Definition at line 39 of file housekeep.c.

{
    char fname[1024];
    FILE *muplog;
    
    if(strncmp(mupdate,nowstr,8)==0) return;
    snprintf(fname,sizeof(fname),"%s/mupdate",tmpd);
    muplog=fopen(fname,"r");
    if(muplog==NULL) goto domup;
    fread(mupdate,8,1,muplog); mupdate[8]=0; fclose(muplog);
    if(strncmp(mupdate,nowstr,8)==0) return;
    domup:
    muplog=fopen(fname,"w");
    if(muplog!=NULL) {
       fwrite(nowstr,8,1,muplog);fclose(muplog);
    }
    call_ssh(0,"bin/modupdate.auto &>%s/modupdate.log",tmpd);
}

Here is the call graph for this function:

Here is the caller graph for this function: