danco;593840 Wrote: 
> I've almost certainly done something wrong, as I can see (from Activity
> Monitor) that sleepwatcher is running, but there's no log. As I haven't
> switched off the way I am currently preventing sleep, I've no idea if
> the script is working.
> 

A thought:

If your existing method is already running, then my guess is that this
script will rarely be called.

If you remove the "--quiet" option from the start up item then the
script will become distinctly chattier, and will make log entries each
time the "system sleeper" calls it.
You would, then, see a log entry when the system does eventually sleep.
At present I don't think you will.

i.e. edit the following line in the file "Squeezebox_DenySleep":

sudo -H -u $USER_TO_RUN /usr/local/sbin/sleepwatcher -d -V
-a"/Library/StartupItems/Squeezebox_DenySleep/sbplayers_inactive
--quiet 1>>$HOME/Library/Logs/Squeezebox_DenySleep.log 2>&1"

to become:

sudo -H -u $USER_TO_RUN /usr/local/sbin/sleepwatcher -d -V
-a"/Library/StartupItems/Squeezebox_DenySleep/sbplayers_inactive
1>>$HOME/Library/Logs/Squeezebox_DenySleep.log 2>&1"


Another thought:

One might also create a script suitable for use as a "login" item,
rather than a system start up item. I'll give that some thought as well
as a launchd item. Ideally one only wants to run the task when the
server itself is running.


Personally, I start the server at boot because I use it without
actually being logged in.


-- 
mrw
------------------------------------------------------------------------
mrw's Profile: http://forums.slimdevices.com/member.php?userid=38299
View this thread: http://forums.slimdevices.com/showthread.php?t=48521

_______________________________________________
plugins mailing list
plugins@lists.slimdevices.com
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to