Difference between revisions of "Code sources - S00custom-options source code"
From WikiDLXTV
m |
|||
Line 1: | Line 1: | ||
+ | <pre> | ||
#!/bin/sh | #!/bin/sh | ||
Line 27: | Line 28: | ||
;; | ;; | ||
esac | esac | ||
+ | </pre> |
Revision as of 14:28, 26 March 2010
#!/bin/sh #type external storage id #to see it, type command "mount" in ssh on you device #you will see string like "/tmp/media/usb/USB1/8d29b444-7459-41c2-a12a-c2a97087aef4" #"8d29b444-7459-41c2-a12a-c2a97087aef4" - id DEVID="<external storage id>" #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