gharris999 wrote: > Close, 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 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'.
Hello, i have tested it but i dont get it to run. I have the script: #!/bin/bash user=`who | wc -l` #echo $user exit $user Than i have give the Script permission: chmod a+x /usr/local/sbin/benutzer.sh Than i have edited the /etc/sudoers and add: squeezeboxserver ALL = NOPASSWD: /usr/local/sbin/benutzer.sh* squeezeboxserver ALL = NOPASSWD: /usr/bin/who* squeezeboxserver ALL = NOPASSWD: /bin/wc* Now i can execute it with: sudo -u squeezeboxserver /usr/local/sbin/benutzer.sh In the Plugin i have the command: sudo /usr/local/sbin/benutzer.sh But here it returns still 256. I have also tested the Code from epoch 1970. Blocking works, but when i logged out, the blocking will not canceled. Sorry, i am a newby to Linux. Thank you for your help! regards Blondie ------------------------------------------------------------------------ Blondie's Profile: http://forums.slimdevices.com/member.php?userid=50288 View this thread: http://forums.slimdevices.com/showthread.php?t=48521 _______________________________________________ plugins mailing list [email protected] http://lists.slimdevices.com/mailman/listinfo/plugins
