Code sources - S00custom-options source code

From WikiDLXTV
Revision as of 13:54, 12 March 2010 by Mimikino (Talk | contribs)

Jump to: navigation, search
  1. !/bin/sh
  1. type external storage id
  2. to see it, type command "mount" in ssh on you device
  3. you will see string like "/tmp/media/usb/USB1/8d29b444-7459-41c2-a12a-c2a97087aef4"
  4. "8d29b444-7459-41c2-a12a-c2a97087aef4" - id

DEVID="<external storage id>"

  1. type deluge config folder

DELUGECONFIG="<deluge config folder>"

case "$1" in start|restart) $0 waitfordevice& ;; waitfordevice) DEVROOT="" while [ "$DEVROOT" = "" ] ; do DEVROOT="`mount | grep $DEVID | sed 's/^[/]dev[/].*[ ]on[ ]//g' | sed 's/[ ]type[ ]ext3.*//g'`" #echo $DEVROOT sleep 3 done $DEVROOT/$DELUGECONFIG/deluge.script start $DEVROOT/$DELUGECONFIG config_tool -c POWER_DOWN_ACTION10="$DEVROOT/power.down $DELUGECONFIG" #echo "$DEVROOT/$DELUGECONFIG/deluge.script start $DEVROOT/$DELUGECONFIG" #echo "config_tool -c POWER_DOWN_ACTION10="$DEVROOT/power.down $DELUGECONFIG"" ;; esac