Changes between Version 1 and Version 2 of Scripts


Ignore:
Timestamp:
Dec 14, 2008, 1:12:38 PM (12 years ago)
Author:
Waldorf
Comment:

--

Legend:

Unmodified
Added
Removed
Modified
  • Scripts

    v1 v2  
    11= Transmission Scripts =
    22[[PageOutline]]
    3 These will mainly be command-line scrips using the transmission-remote.
     3== Introduction ==
    44
    5 == Category 1 ==
    6 ==== Block List Updater ====
    7 {{{
    8 #!/bin/sh
     5Thanks 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.
    96
    10 PID="`pidof transmission-daemon`"
    11 if [ -n "$PID" ]; then
    12         kill $PID
    13 fi
     7Mac 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"}}}.
    148
    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.''
    4510
    4611
    47 == Category 3 ==
     12== Scripts ==
     13=== Category 1 ===
     14 * [wiki:Scripts/BlockListUpdater Block List Updater]
     15
     16=== Category 2 ===
    4817
    4918
    50 == Category 4 ==
     19=== Category 3 ===
     20
     21
     22=== Category 4 ===
    5123
    5224----
    5325== 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]]
    5526> wereHamster: http://pastie.org/338556 http://pastie.org/338555 http://pastie.org/338552