Mac: Stopping/Starting tivo desktop from Terminal

Discussion in 'TiVo Home Media Features & TiVoToGo' started by GriffinW, Aug 16, 2011.

  1. GriffinW

    GriffinW New Member

    15
    0
    Apr 1, 2005
    Northern...
    I have looked every where I can think of for this, but can't find an answer that seems to apply.

    I know that I can start/stop TiVo Desktop from system prefs, no problem there. What I need to do is to stop/start/restart Tivo desktop from Terminal. (Actually i want to restart it from a remote ssh connection, but if I can do it from Terminal, I can do it remotely.)

    I have a lot of shows/movies I've transferred over the years, and stored in different folders. Having them all in one big, flat folder is too much of a list to go through from my Tivo, and causes some weird behavior that isn't relative here. I have written some scripts that will move the shows around (i.e. I can remotely ssh to my Mac, run a shell script that moves all Fringe episodes from their own folder to the main Tivo desktop folder, and another script that moves them all back to their own folder. This is all on the same hard drive, so it happens very quickly.)

    The problem is that Tivo Desktop doesn't seem to recognize the changes unless it stops and restarts. So, I went through all the trouble of setting this up so I can quickly move all of the Fringe episodes (or whatever show genre I want) to the main Tivo folder from my phone, from pretty much anywhere, in about 20 seconds. But then, I have to go to my Mac (which is located quite a ways from where my Tivo is located), manually open the Sys prefs, etc., etc. to stop and restart the tivo desktop server so it will recognize the changes.

    (Sometimes, I am actually not at home, and my girlfriend wants to watch some movie that I moved off to another folder, and I wanted to be able to just move the movie remotely over to the main folder. This is kind of what prompted this whole project. So, in that case, I don't have the option of going to the Mac and restarting TiVo Desktop.)

    I can remotely stop the tivo service that is running from a remote command line, which is a pain in itself, because the only way I know how to do that is to kill the process, which is different every time it runs, so it is difficult (but not impossible, I know) to automate. But I can't figure out how to start it back up again. From what I have found, launchctl or SystemStart commands are involved, but I just can't find (or figure out) exactly the command to use.

    So, does anybody know a way to do this? I would like to just create a shell script to restart Tivo Desktop, pretty much the same way I created the scripts to move the different show groups around (Applescripts actually, kicked off by a shell script) that would just restart TiVo Desktop. Or perhaps there is some way to kick TiVo Desktop to rescan the Tivo folder, I don't know.

    I created an Apple Automator workflow/Applescript that turns the Sys pref off, then back on, by moving the mouse around, etc., but it doesn't always work correctly, and it won't run at all when my Mac is locked, which it always is when I am away from it, so that did not turn out to be a good solution.

    It just seems that there should be a simple command or two that would accomplish this. I am currently running OS X 10.7 (Lion), but I think any solution that will work from 10.5 or 10.6 should work. (Seems that the way services are controlled changed around 10.5, but haven't changed since.)

    Thanks for reading my long geeky post, and for any help anybody can offer.

    Griffin
     

Share This Page