Syncing Thumbnails with rsync via button in UI
#1
Hi all,
I have 3 PC's running XBMC Eden final with a central mysql database. I have spent next to 2 hours searching the forums and trying to get this to work, to no avail. Here is what I did.
I created a button in the UI that, when clicked, executes a simple script of mine that uses rsync to synchronize the Thumbnails and fanart from one PC to the others.
This is the script that I want to invoke:
Code:
#!/bin/sh
rsync -avzh --stats --progress -e '/usr/bin/ssh -i /home/xbmc/.ssh/id_dsa' /home/xbmc/.xbmc/userdata/Thumbnails [email protected]:/home/xbmc/.xbmc/userdata 2>&1 > /home/xbmc/output
The button when cllicked calls the builtin System.Exec function like so
Code:
<onclick>System.Exec(/home/synctest.sh)</onclick>
1. rsync is not executed (/home/xbmc/output contains nothing)
2. XBMC crashes
Script runs fine on the command line.
I similarly created a button to launch Firefox and it works. What am i doing wrong?
Reply
#2
I vaguely remember that the C-function does not execte scripts, only real executables. You may try
System.Exec(/bin/sh /home/synctest.sh)
And I'd always start with a simple script like

#!/bin/sh
echo "I am alive" >> /home/xbmc/output

Reply
#3
(2012-05-03, 09:12)thd042 Wrote: I vaguely remember that the C-function does not execte scripts, only real executables. You may try
System.Exec(/bin/sh /home/synctest.sh)
And I'd always start with a simple script like

#!/bin/sh
echo "I am alive" >> /home/xbmc/output
Ahh... Thanks, but I eventually ended up using the RunScript() function and so had to whip up a simplistic Python script to in turn run the rsync script. Much better since XBMC doesn't iconize this way. On with further experiments. The pitfall is XBMC is so customizable I'll be tinkering with stuff to tailor it to my needs instead of using it to stream media Rofl

Reply

Logout Mark Read Team Forum Stats Members Help
Syncing Thumbnails with rsync via button in UI0