Difference between revisions of "Talk:IScript"

From AwkwardTV
Jump to: navigation, search
(New page: Hi, I've created a script that dynamically generates scripts in the ~Documents/Scripts folder for Iscript. The purpose of those generated scripts are to archive my movies when I am done w...)
 
Line 18: Line 18:
 
''#!/bin/bash
 
''#!/bin/bash
 
df -h | grep disk0s4 | awk '{print $4" disk space left."}'''
 
df -h | grep disk0s4 | awk '{print $4" disk space left."}'''
 +
 +
It would actually be very easy if it's fire and forget you want. That is actually the way the original iscripts worked. If you want i can bring that back

Revision as of 20:14, 19 June 2008

Hi,

I've created a script that dynamically generates scripts in the ~Documents/Scripts folder for Iscript. The purpose of those generated scripts are to archive my movies when I am done watching them.

For example, a cron job runs and generates a script called ARCHIVE-Wieners.DVDRip.XviD-BeStDivX.sh in ~Documents/Scripts. The content of the script is the following:

#!/bin/bash mv /Users/frontrow/Movies/Deadmoo/2008_06_05_Wieners.DVD /Users/frontrow/Movies/archive/ & rm /Users/frontrow/Documents/Scripts/ARCHIVE-Wieners.DVD.sh

The problem is when I run ARCHIVE-Wieners.DVD from the AppleTV iscripts menu the system appears to hangs (possibly because it is running the mv command which takes a long time. The remote control commands are being sent to the running script until it is done executing). How can I create a script which will run in the background and return my controls immediately to the appletv? I added the '&' at the end of the 'mv' command which runs the command in the background and completes the script. It works well when run from ssh on the command line, but hangs when run from the iscript menu.

BTW, thanks for the nice plugin. Here's a very simple script I created to display disk space left on the device.

#!/bin/bash df -h | grep disk0s4 | awk '{print $4" disk space left."}

It would actually be very easy if it's fire and forget you want. That is actually the way the original iscripts worked. If you want i can bring that back