wok rev 10850

Fix: add transmission-daemon init files
author Alexander Medvedev <devl547@gmail.com>
date Sun Jun 12 03:09:50 2011 +0000 (2011-06-12)
parents e18a6d4e2d71
children 9cb1952ef61d
files transmission-daemon/stuff/settings.json transmission-daemon/stuff/transmission-daemon
line diff
     1.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     1.2 +++ b/transmission-daemon/stuff/settings.json	Sun Jun 12 03:09:50 2011 +0000
     1.3 @@ -0,0 +1,65 @@
     1.4 +{
     1.5 +    "alt-speed-down": 50, 
     1.6 +    "alt-speed-enabled": false, 
     1.7 +    "alt-speed-time-begin": 540, 
     1.8 +    "alt-speed-time-day": 127, 
     1.9 +    "alt-speed-time-enabled": false, 
    1.10 +    "alt-speed-time-end": 1020, 
    1.11 +    "alt-speed-up": 50, 
    1.12 +    "bind-address-ipv4": "0.0.0.0", 
    1.13 +    "bind-address-ipv6": "::", 
    1.14 +    "blocklist-enabled": false, 
    1.15 +    "blocklist-url": "http://www.example.com/blocklist", 
    1.16 +    "cache-size-mb": 32, 
    1.17 +    "dht-enabled": true, 
    1.18 +    "download-dir": "/mnt/data/downloads", 
    1.19 +    "download-limit": 100, 
    1.20 +    "download-limit-enabled": 0, 
    1.21 +    "encryption": 1, 
    1.22 +    "idle-seeding-limit": 30, 
    1.23 +    "idle-seeding-limit-enabled": false, 
    1.24 +    "incomplete-dir": "/root/Downloads", 
    1.25 +    "incomplete-dir-enabled": false, 
    1.26 +    "lpd-enabled": true, 
    1.27 +    "max-peers-global": 35, 
    1.28 +    "message-level": 2, 
    1.29 +    "open-file-limit": 32, 
    1.30 +    "peer-congestion-algorithm": "", 
    1.31 +    "peer-limit-global": 150, 
    1.32 +    "peer-limit-per-torrent": 60, 
    1.33 +    "peer-port": 51413, 
    1.34 +    "peer-port-random-high": 65535, 
    1.35 +    "peer-port-random-low": 49152, 
    1.36 +    "peer-port-random-on-start": false, 
    1.37 +    "peer-socket-tos": "default", 
    1.38 +    "pex-enabled": true, 
    1.39 +    "pidfile": "/var/run/transmission-daemon.pid", 
    1.40 +    "port-forwarding-enabled": true, 
    1.41 +    "preallocation": 1, 
    1.42 +    "prefetch-enabled": 1, 
    1.43 +    "ratio-limit": 2, 
    1.44 +    "ratio-limit-enabled": false, 
    1.45 +    "rename-partial-files": true, 
    1.46 +    "rpc-authentication-required": true, 
    1.47 +    "rpc-bind-address": "0.0.0.0", 
    1.48 +    "rpc-enabled": true, 
    1.49 +    "rpc-password": "{9aebfab2dedb060801e37b93e475042635dd8d2cNtxckwS7", 
    1.50 +    "rpc-port": 9091, 
    1.51 +    "rpc-url": "/transmission/", 
    1.52 +    "rpc-username": "tux", 
    1.53 +    "rpc-whitelist": "*", 
    1.54 +    "rpc-whitelist-enabled": true, 
    1.55 +    "script-torrent-done-enabled": false, 
    1.56 +    "script-torrent-done-filename": "", 
    1.57 +    "speed-limit-down": 100, 
    1.58 +    "speed-limit-down-enabled": false, 
    1.59 +    "speed-limit-up": 100, 
    1.60 +    "speed-limit-up-enabled": false, 
    1.61 +    "start-added-torrents": true, 
    1.62 +    "trash-original-torrent-files": false, 
    1.63 +    "umask": 18, 
    1.64 +    "upload-limit": 200, 
    1.65 +    "upload-limit-enabled": 0, 
    1.66 +    "upload-slots-per-torrent": 14, 
    1.67 +    "utp-enabled": false
    1.68 +}
     2.1 --- /dev/null	Thu Jan 01 00:00:00 1970 +0000
     2.2 +++ b/transmission-daemon/stuff/transmission-daemon	Sun Jun 12 03:09:50 2011 +0000
     2.3 @@ -0,0 +1,57 @@
     2.4 +#!/bin/sh
     2.5 +# /etc/init.d/transmission-daemon: Start, stop and restart transmission daemon on SliTaz, at boot
     2.6 +# time or with the command line.
     2.7 +#
     2.8 +# To start daemon at boot time, just put the right name in the $RUN_DAEMONS
     2.9 +# variable of /etc/rcS.conf and configure options with /etc/daemons.conf.
    2.10 +#
    2.11 +. /etc/init.d/rc.functions
    2.12 +. /etc/daemons.conf
    2.13 +
    2.14 +NAME=Transmission
    2.15 +DESC="transmission daemon"
    2.16 +DAEMON=/usr/bin/transmission-daemon
    2.17 +OPTIONS="-g /var/transmission-daemon/ -x /var/run/transmission-daemon.pid"
    2.18 +PIDFILE=/var/run/transmission-daemon.pid
    2.19 +
    2.20 +case "$1" in
    2.21 +  start)
    2.22 +    if active_pidfile $PIDFILE transmission-daemon ; then
    2.23 +      echo "$NAME already running."
    2.24 +      exit 1
    2.25 +    fi
    2.26 +    echo -n "Starting $DESC: $NAME... "
    2.27 +    $DAEMON $OPTIONS 
    2.28 +    status
    2.29 +    ;;
    2.30 +  stop)
    2.31 +    if ! active_pidfile $PIDFILE transmission-daemon ; then
    2.32 +      echo "$NAME is not running."
    2.33 +      exit 1
    2.34 +    fi
    2.35 +    echo -n "Stopping $DESC: $NAME... "
    2.36 +    killall transmission-daemon
    2.37 +    rm $PIDFILE
    2.38 +    status
    2.39 +    ;;
    2.40 +  restart)
    2.41 +    if ! active_pidfile $PIDFILE transmission-daemon ; then
    2.42 +      echo "$NAME is not running."
    2.43 +      exit 1
    2.44 +    fi
    2.45 +    echo -n "Restarting $DESC: $NAME... "
    2.46 +    killall transmission-daemon
    2.47 +    rm $PIDFILE
    2.48 +    sleep 2
    2.49 +    $DAEMON $OPTIONS
    2.50 +    status
    2.51 +    ;;
    2.52 +  *)
    2.53 +    echo ""
    2.54 +    echo -e "\033[1mUsage:\033[0m /etc/init.d/`basename $0` [start|stop|restart]"
    2.55 +    echo ""
    2.56 +    exit 1
    2.57 +    ;;
    2.58 +esac
    2.59 +
    2.60 +exit 0