I know this has been discussed here:
thread but I need to implement this in Unix shell rather than Perl and I'm no Unix shell expert. Does anyone have any shell script interpretation of this Perl code for a DNR script to return a response code of -2? Also, in Unix, how does one determine if a DNR DD deployment has failed?
... use constant SUCCESS => 0; use constant FAILURE => 1; my $status = SUCCESS; eval {main();}; if ($@) { log_it("Error Executing Deployment DNR Task: $@\n"); $status = FAILURE; } # Let OpenDeploy know if processing failed print qq(\n) if($status); exit($status); ... sub main {...}
**** - I can't format this code properly...