Blondie wrote: 
> Hello!
> 
> Thank you for this great plugin!
> 
> i would add a custom idle check command. If i logged in via ssh the
> server should not go down.
> If i execute 
> who | sudo wc -l 
> at the shell, the command returns how many users are logged in.
> 
> But if i use that as custom idle check command, it returns:
> Plugins::SrvrPowerCtrl::Util::SystemExecCmd (862) Command: "sudo who |
> wc -l" returned 256
> 
> I have also tried to write a script:
> if who | wc -l > 0
> then
> echo 1
> else
> echo 0
> fi
> 
> but that will also not working.
> 
> What should i enter or do here?
> 
> regards
> BlondieClose, but not quite.  You need to capture the user count with 
> something
like
USERCOUNT=`who | wc -l`

.. than then end your script with

exit $USERCOUNT

..which will should return the value to SrvrPowerCtrl.  You'll need to
give the squeezeboxserver user permissions to your script in
/etc/sudoers, of course.  The 256 return value indicates that the
squeezeboxserver user does not have sudo permission to execute 'who'.


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

_______________________________________________
plugins mailing list
[email protected]
http://lists.slimdevices.com/mailman/listinfo/plugins

Reply via email to