gestione GFLOW lancio script alberto
This commit is contained in:
@@ -65,7 +65,7 @@ sub getUnitName { # parm => file received ($trfile)
|
||||
$unit =~ s/;+$//;
|
||||
close FILE;
|
||||
}
|
||||
return $unit;
|
||||
return ( $unit, $unittype );
|
||||
}
|
||||
|
||||
my $readingFile;
|
||||
@@ -103,7 +103,7 @@ while ( my $line = $tail->GetLine() ) {
|
||||
or $filename =~ m/^GFLOW_ID\d\d\d\d_DT\d\d\d\d_\d*$/i )
|
||||
)
|
||||
{
|
||||
my $unit = getUnitName($trfile);
|
||||
my ( $unit, $unittype ) = getUnitName($trfile);
|
||||
print getTimeStamp("log") . " >> Unit $unit - Filename $trfile\n";
|
||||
|
||||
if ( !-d "$path/log" ) {
|
||||
@@ -151,11 +151,16 @@ while ( my $line = $tail->GetLine() ) {
|
||||
setgid($gid);
|
||||
setuid($uid);
|
||||
$ENV{"HOME"} = 'home/' . $truser;
|
||||
if ( $unittype = 'GFLOW' ) {
|
||||
|
||||
}
|
||||
elsif {
|
||||
exec( $scriptpath
|
||||
. "LoadCSVData.pl -f \"$dest\" -s \"$outpath/SQL/$filename"
|
||||
. "_"
|
||||
. "$timestamp.sql\" -d $truser >> /home/$truser/log/loadcsvdata.log 2>&1"
|
||||
);
|
||||
}
|
||||
exit(0);
|
||||
}
|
||||
if ( ( $truser ne 'asega' ) and ( $truser ne 'corra' ) ) {
|
||||
|
||||
Reference in New Issue
Block a user