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