Open-AudIT

What's on your network?
It is currently Sat Jul 21, 2018 7:47 pm

All times are UTC + 10 hours




Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 
Author Message
PostPosted: Mon Oct 20, 2008 6:16 am 
Offline
Newbie

Joined: Tue Oct 14, 2008 8:31 pm
Posts: 28
In a number of places in the linux scripts, there is a sequence like the following. This requires write access to the current directory.

wget ... http://...../somefile.php
rm somefile.php

That could be better replaced with this sequence:

(at the top of the file)
OA_WGET_OUTPUT=/dev/null

(down below)
wget -O $OA_WGET_OUTPUT ... http://...../somefile.php

Two advantages:

- Since the output is never written to a file, there is no problem with a read-only directory.
- for debugging, you can easily redirect the output either to stdout or to a real file, just by changing OA_WGET_OUTPUT. Note: to send output to stdout, use a minus sign as the file name:
OA_WGET_OUTPUT=-


Top
 Profile  
Reply with quote  
Display posts from previous:  Sort by  
Forum locked This topic is locked, you cannot edit posts or make further replies.  [ 1 post ] 

All times are UTC + 10 hours


Who is online

Users browsing this forum: No registered users and 3 guests


You cannot post new topics in this forum
You cannot reply to topics in this forum
You cannot edit your posts in this forum
You cannot delete your posts in this forum
You cannot post attachments in this forum

Search for:
Jump to:  
cron
Powered by phpBB® Forum Software © phpBB Group