Bacula-users

[Bacula-users] clientRunAfterJob on Mac -> Shutdown

2012-11-27 11:30:36
Subject: [Bacula-users] clientRunAfterJob on Mac -> Shutdown
From: Julien Cochennec <julien.cochennec AT mnhn DOT fr>
To: bacula-users AT lists.sourceforge DOT net
Date: Tue, 27 Nov 2012 17:27:54 +0100
Hi there,
I know it is not a Bacula problem but maybe some of you already met this.
On Mac computers (desktops only) I run this script in clientAfterJob :

#! /bin/bash
if [ "$(who -u | grep -c console)" == 0 ]
then
         echo "Off" && shutdown -h +5;
else
         echo "Not yet";
fi
exit 0;

So the desktop shuts down after the Job is done. On one desktop (only 
one?) Mac 10.6 I get a "can't detach from console".
Should I add a nohup or a disown before I do this? Should I use halt 
instead of shutdown?

How do you switch off desktops after backup? Is there an easier way?

Feel free to use it, the script (when it works :-)) detects any session 
and shutdown if no session is running, when the Job is done.

------------------------------------------------------------------------------
Monitor your physical, virtual and cloud infrastructure from a single
web console. Get in-depth insight into apps, servers, databases, vmware,
SAP, cloud infrastructure, etc. Download 30-day Free Trial.
Pricing starts from $795 for 25 servers or applications!
http://p.sf.net/sfu/zoho_dev2dev_nov
_______________________________________________
Bacula-users mailing list
Bacula-users AT lists.sourceforge DOT net
https://lists.sourceforge.net/lists/listinfo/bacula-users

<Prev in Thread] Current Thread [Next in Thread>
  • [Bacula-users] clientRunAfterJob on Mac -> Shutdown, Julien Cochennec <=