Create a new system variable
duncanbrown at atom.csionline.net
Thu Apr 8 17:19:31 UTC 2004
you want to create a wrapper script, OR have the export of your http_proxy
var on your crontab line seperated from your command by an ; or &&
; means that it'll run the following command whether or not the first one
&& means that it'll only run it if the previous command completed
if this is for apt (apt-get / apt-cache), then you can modify the apt.conf
file (do a search for the word proxy) and you can set it up in there and
now, you could also create a wrapper script
create /usr/local/bin/my_wrapper (or whatever you want to call it)
here are the contents
now, run this
chmod +x /usr/local/bin/my_wrapper
this makes the script executable.
now add /usr/local/bin/my_wrapper to your crontab.
Matthew Benjamin said:
> Can someone tell me how to create a system variable. For instance I
> would like to create a variable called http_proxy that will be available
> for a cronjob. This requires the variable to be available to the process
> when no one is logged in. Export does not work because it disappears
> when you log off. editing the /etc/profile file to include this does not
> work because the variable is created as an environment variable and only
> exits while you're logged on. That's my dilemma. Please help.
-+(duncanbrown at linuxadvocate.net
Blessed is the man who, having nothing to say, abstains from giving wordy
evidence of the fact.
-- George Eliot
More information about the users