J
Julian
Hi.
I have a problem with a script in perl that obtain value of HOSTNAME
environment variable.
!/usr/bin/perl
# Autoflush
$|=1;
do("/home/sixsl/scripts/constantes.pl");
$lock_dir="/var/dbsync";
$host_actual=$ENV{HOSTNAME};
....
When I executed the script manually from the shell it obtain correct
value for hostname (harpo for this case). But when I put the script in
the cron the perl obtain incorrect value, it gets localhost. Cron job
is executed with the same user that I executed the script from the
shell.
The cron daemon is vixie cron. The perl version is 5.8.0. The Linux
box is RedHat 9.0.
Julian.
I have a problem with a script in perl that obtain value of HOSTNAME
environment variable.
!/usr/bin/perl
# Autoflush
$|=1;
do("/home/sixsl/scripts/constantes.pl");
$lock_dir="/var/dbsync";
$host_actual=$ENV{HOSTNAME};
....
When I executed the script manually from the shell it obtain correct
value for hostname (harpo for this case). But when I put the script in
the cron the perl obtain incorrect value, it gets localhost. Cron job
is executed with the same user that I executed the script from the
shell.
The cron daemon is vixie cron. The perl version is 5.8.0. The Linux
box is RedHat 9.0.
Julian.