2011-11-25, 03:10
tinybilbo Wrote:Thanks for the reply,Best waywill be to create a script like this :
I have tried the script with and without the !/bin/bash line,
I have also tried different permissions.
I think you are about the XBMC not having the rights, because normally I run it from a Console, logged in as root.
I'll get a script running from console, logged in as XBMC, the try AL again...
Code:
#!/bin/bash
sudo cp /etc/init.d/interfaces.mu /etc/init.d/interfaces
sudo /etc/init.d/networking restart
Then, to avoid to be asked for passwords each time the user XBMC use the sudo command into the script, you will have to edit the /etc/sudoers files (using sudo viduso) and add the following lines at the end :
Code:
%xbmc ALL = NOPASSWD: cp
%xbmc ALL = NOPASSWD: /etc/init.d/networking