Ignore:
Timestamp:
02/27/17 16:46:32 (7 years ago)
Author:
obi
Message:

tithek move python files download location up to hdd > swap > mnt > tmp

File:
1 edited

Legend:

Unmodified
Added
Removed
  • titan/plugins/tithek/tithek_global.h

    r40150 r40153  
    838838                                dnode->page = ostrcat("/mediathek/python.tar", NULL, 0, 0);
    839839                                dnode->port = 80;
    840                                 dnode->filename = ostrcat("/tmp/python.tar", NULL, 0, 0);
     840                                if(getfreespace("/mnt") / 1024 < 102400) //100mb
     841                                }
     842                                        mkdir("/mnt/.tithek", 0777);
     843                                        if(file_exist("/mnt/.tithek")
     844                                                dnode->filename = ostrcat("/mnt/.tithek/python.tar", NULL, 0, 0);
     845                                }                               
     846                                if(file_exist("/media/hdd") && getfreespace("/media/hdd") / 1024 < 102400)
     847                                {
     848                                        mkdir("/media/hdd/.tithek", 0777);
     849                                        if(file_exist("/media/hdd/.tithek")
     850                                                dnode->filename = ostrcat("/media/hdd/.tithek/python.tar", NULL, 0, 0);
     851                                }
     852                                if(file_exist("/var/swap") && getfreespace("/var/swap") / 1024 < 102400)
     853                                {
     854                                        mkdir("/var/swap/.tithek", 0777);
     855                                        if(file_exist("/var/swap/.tithek")
     856                                                dnode->filename = ostrcat("/var/swap/.tithek/python.tar", NULL, 0, 0);
     857                                }
     858                                else
     859                                        dnode->filename = ostrcat("/tmp/python.tar", NULL, 0, 0);
    841860                                dnode->auth = ostrcat(HTTPAUTH, NULL, 0, 0);
    842861                                dnode->connfd = -1;
Note: See TracChangeset for help on using the changeset viewer.