RicardoEscobar
July 6th, 2012, 04:59 AM
Hello there. Here is the situation:
I installed a twitter client calles "Twidge" so my ubuntu server can tweet now (cool)
To tweet:
sudo twidge update "This is a test tweet"If I run it without sudo:
twidge update"This is a test tweet"
twidge: /home/user/.twidgerc: openFile: permission denied (Permission denied)On the other hand I have an script called tuitTorrent.sh, and here it is:
#!/bin/bash
#Este script se ejecuta desde /var/lib/transmission-daemon/info/settings.json
sudo twidge update "@MyTwitterAccount torrent downloaded.`date`"If I run the scrip as
sudo /home/user/scripts/tuitTorrent.**** ask for my sudo password and I just type it in, then it works.
However I installed Transmission, a bit torrent client, on the configuration file: var/lib/transmission-daemon/info/settings.json I may set up the path to a script with runs after the torrent downloads successfully. So I set this on the configuration file:
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/home/user/scripts/tuitTorrent.sh",However when a torrent finishes downloading, the script never runs, I guess it's because the twidge command requires a sudo prefix, and I don't know how to give an script sudo execute level or how to enable twidge to run without needing a sudo password.
So there is my problem, I want to tweet after transmission finishes to download, I have the script but it does not run unless it have a sudo password, yet I don't execute the script directly, transmission daemon runs it.
I installed a twitter client calles "Twidge" so my ubuntu server can tweet now (cool)
To tweet:
sudo twidge update "This is a test tweet"If I run it without sudo:
twidge update"This is a test tweet"
twidge: /home/user/.twidgerc: openFile: permission denied (Permission denied)On the other hand I have an script called tuitTorrent.sh, and here it is:
#!/bin/bash
#Este script se ejecuta desde /var/lib/transmission-daemon/info/settings.json
sudo twidge update "@MyTwitterAccount torrent downloaded.`date`"If I run the scrip as
sudo /home/user/scripts/tuitTorrent.**** ask for my sudo password and I just type it in, then it works.
However I installed Transmission, a bit torrent client, on the configuration file: var/lib/transmission-daemon/info/settings.json I may set up the path to a script with runs after the torrent downloads successfully. So I set this on the configuration file:
"script-torrent-done-enabled": true,
"script-torrent-done-filename": "/home/user/scripts/tuitTorrent.sh",However when a torrent finishes downloading, the script never runs, I guess it's because the twidge command requires a sudo prefix, and I don't know how to give an script sudo execute level or how to enable twidge to run without needing a sudo password.
So there is my problem, I want to tweet after transmission finishes to download, I have the script but it does not run unless it have a sudo password, yet I don't execute the script directly, transmission daemon runs it.