gharris999;437491 Wrote: > Anyway, with that out of the way, you could try this: > > Create a script by performing these commands in a terminal window...
Thanks for the comprehensive reply! The test script was a very good idea and it helped me sort things out. I'll try to recall what I've done while I can still remember... SqueezeCenter/SSOTS on the QNAP TS-509 can't seem to run terminal commands directly. But it's able to run commands/scripts found here: /share/MD0_DATA/SSODS/bin/ Under /share/MD0_DATA/SSODS/bin/ there are many command including 'sudo'. This sudo's sudoers file is located at /share/MD0_DATA/SSODS/etc/. So all I had to do was create a sudoers file and a script to shutdown the TS-509: 1) Create sudoers file under /share/MD0_DATA/SSODS/etc/. Tip: You can simply make a copy of the file sudoers-template already there. 2) Add the following lines: Code: -------------------- admin ALL=(ALL) ALL ssods ALL=(ALL) NOPASSWD: /sbin/poweroff -------------------- Note: The TS-509 has no root user. So my root user is 'admin'. On older/lower QNAP models, I believe the shutdown command is '/sbin/kill'. 3) Create a script (I named mine shutdown.sh) under /share/MD0_DATA/SSODS/bin/ and add the following: Code: -------------------- #!/bin/sh sudo -u admin /sbin/poweroff -------------------- 4) In the SvrPowerControl settings for Shutdown Command simply put: Code: -------------------- shutdown.sh -------------------- That's it! I don't think "Suspend" and "Hibernate" are applicable for the TS-509 and I have no need for "Restart" or "Restart SqueezeCenter". But I guess it would be easy to create an extra restart script to reboot the machine, if needed. One problem though with version 20090701.14. I'm not able to set "Push players to SqueezeNetwork on “external” shutdown". I will check the box and then "Apply" but after refresh the box is unchecked again. This is not a big problem since I'm now able to shutdown the TS-509 using SvrPowerControl. But it would anyway be nice to get this feature working. By the way, thanks for such an awesome plugin! -- Aylwin ------------------------------------------------------------------------ Aylwin's Profile: http://forums.slimdevices.com/member.php?userid=138 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