Re: redirect command output

Josip Deanovic via Bacula-users <[email protected]>
Newsgroups gmane.comp.bacula.user
Message-ID <5032699.3CG3KpFre5@brutus>
On Friday, December 27, 2024 4:19:27 PM CET Mailing_List via Bacula-users 
wrote:
> Hi,
> 
> In a bacula job, I have:
>   RunScript {
>     RunsWhen = Before
>     FailJobOnError = No
>     RunsOnClient = No
>     Command = "/usr/local/perso/suspend-gest.sh add bacula > /dev/null"
>   }
> 
> but despite the > /dev/null I still get the output in the log:
> 
> Dec 27 08:40 coffee-dir JobId 18506: shell command: run BeforeJob
> "/usr/local/perso/suspend-gest.sh add bacula > /dev/null"
> Dec 27 08:40 coffee-dir JobId 18506: BeforeJob: Inhibitor 'bacula'
> count incremented to 3.
> 
> 
> Dec 27 08:40 coffee-dir JobId 18506: Start Backup JobId 18506,
> Job=BackupVPS1.2024-12-27_08.40.00_05
> ...
> 
> I would have preferred not to have this output, is it possible? and if
> so, how?
> 
> Thanks.

Hello,

Could you try something like this:

Command = "/usr/bin/bash -c '/usr/local/perso/suspend-gest.sh add bacula > /
dev/null'"


Regards

-- 
Josip Deanovic
lmpx.com only provides a reader for public news (NNTP) servers. It is not affiliated with the servers or forums shown here and is not responsible for the content of articles, which is written by their respective authors.