Changes between Version 1 and Version 2 of Scripts
- Timestamp:
- Dec 14, 2008, 1:12:38 PM (13 years ago)
Legend:
- Unmodified
- Added
- Removed
- Modified
-
Scripts
v1 v2 1 1 = Transmission Scripts = 2 2 [[PageOutline]] 3 These will mainly be command-line scrips using the transmission-remote. 3 == Introduction == 4 4 5 == Category 1 == 6 ==== Block List Updater ==== 7 {{{ 8 #!/bin/sh 5 Thanks to the powerful [wiki:rpc], {{{transmission-remote}}} can talk to any client that has the rpc enabled. This means that a script written using {{{transmission-remote}}} or [wiki:rpc] can, without rewrite, comunicate with all the Transmission clients: GTK+ client, Mac client and the daemon. 9 6 10 PID="`pidof transmission-daemon`" 11 if [ -n "$PID" ]; then 12 kill $PID 13 fi 7 Mac OS users may ask wether there will be Applescript scripts, the answer is no. Although Applescript is a nice technology, it's a pain to implement. But fear not! Mac OS X is a Unix after all, so any script you find here will also work on the Mac. Even from within Applescript, you can run these scripts by typing: {{{do shel script "path/to/script"}}}. 14 8 15 echo -n "Waiting for the daemon to exit " 16 sleep 2 17 18 COUNT=1 19 while [ -n "`pidof transmission-daemon`" ]; do 20 COUNT=$((COUNT + 1)) 21 if [ $COUNT -gt 60 ]; then 22 echo -n "transmission-daemon doesn't respond, killing it with -9" 23 kill -9 `pidof transmission-daemon` 24 break 25 fi 26 27 sleep 2 28 echo -n "." 29 done 30 31 echo " done" 32 33 cd $HOME/.config/transmission-daemon/blocklists/ 34 if wget http://www.bluetack.co.uk/config/level1.gz 1>/dev/null 2>&1 ; then 35 rm -f level1 && gunzip level1.gz 36 echo "blocklist updated" 37 else 38 echo "blocklist not updated" 39 fi 40 41 transmission-daemon 42 }}} 43 44 == Category 2 == 9 ''These will mainly be command-line scrips using the transmission-remote.'' 45 10 46 11 47 == Category 3 == 12 == Scripts == 13 === Category 1 === 14 * [wiki:Scripts/BlockListUpdater Block List Updater] 15 16 === Category 2 === 48 17 49 18 50 == Category 4 == 19 === Category 3 === 20 21 22 === Category 4 === 51 23 52 24 ---- 53 25 == Comments == 54 > Waldorf: Still a work in progress. I was thinking of this as a portal, and each script in it's own page?[[BR]]55 26 > wereHamster: http://pastie.org/338556 http://pastie.org/338555 http://pastie.org/338552