1 File Edit Options Buffers Tools Help
39 $sysconf = getenv(
'SYSCONFDIR');
40 if($sysconf === FALSE)
42 if(file_exists(
'/usr/local/etc/fossology'))
44 $sysconf =
'/usr/local/etc/fossology';
46 else if(file_exists(
'/etc/fossology'))
48 $sysconf =
'/etc/fossology';
51 if($sysconf === FALSE || $sysconf == NULL)
53 echo
"FATAL! cannot determine where the fossology sysconfigdir is located\n";
56 $RC = fopen(
"fossology.rc",
'w');
59 echo
"FATAL! could not open fossology.rc for writting\n";
62 $many = fwrite($RC, $sysconf);
67 $GLOBALS[
'SYSCONFDIR'] = $sysconf;
68 putenv(
"SYSCONFDIR={$GLOBALS['SYSCONFDIR']}");
69 $_ENV[
'SYSCONFDIR'] = $GLOBALS[
'SYSCONFDIR'];