Changeset 31513 for main/trunk/greenstone2/perllib/servercontrol.pm
- Timestamp:
- 2017-03-14T15:30:24+13:00 (7 years ago)
- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
main/trunk/greenstone2/perllib/servercontrol.pm
r31507 r31513 140 140 141 141 my $wget_file_path = &FileUtils::filenameConcatenate($ENV{'GSDLHOME'}, "bin", $ENV{'GSDLOS'}, "wget"); 142 my $tmpfilename = time . ".html"; # random name for file wherein we'll store the HTML page retrieved by wget 143 142 my $tmpfilename = &util::get_tmp_filename(".html", 1); # random file name with html extension in timestamped-tmpdir location (2nd param=1) 143 # wherein we'll store the HTML page retrieved by wget 144 144 145 # https://www.gnu.org/software/wget/manual/wget.html 145 146 # output-document set to - (STDOUT), so page is streamed to STDOUT … … 181 182 # server not running 182 183 $self->print_msg("*** Server not running. $library_url$command\n", 3); 184 &util::rm_tmp_file($tmpfilename); # will also remove any randomly named tmp directories containing the file 183 185 return 0; 184 186 } … … 195 197 sysread(FIN, $resultstr, -s FIN); 196 198 close(FIN); 197 &FileUtils::removeFiles("$tmpfilename"); 199 &util::rm_tmp_file($tmpfilename); # will also remove any randomly named tmp directories containing the file 200 198 201 199 202 #$resultstr =~ s@.*gs_content\"\>@@s; ## only true for default library servlet
Note:
See TracChangeset
for help on using the changeset viewer.