diff options
author | Greg Frost <gregfrost1@bigpond.com> | 2010-04-18 05:55:06 (GMT) |
---|---|---|
committer | Greg Frost <gregfrost1@bigpond.com> | 2010-04-18 05:55:06 (GMT) |
commit | d4589eee8998a168eaa79af7a04d82faac1a738d (patch) | |
tree | 731625204f3902bb9b5f7a8a492c6b8fcc09c915 /abs/extra-testing/community/transmission-cli/run.transmissiond | |
parent | 5106977528d3d26919263bf62d504035a7720633 (diff) | |
parent | 787f13cd63c75c9c5090c10c0e888f48a59c0e49 (diff) | |
download | linhes_pkgbuild-d4589eee8998a168eaa79af7a04d82faac1a738d.zip linhes_pkgbuild-d4589eee8998a168eaa79af7a04d82faac1a738d.tar.gz linhes_pkgbuild-d4589eee8998a168eaa79af7a04d82faac1a738d.tar.bz2 |
Merge branch 'master' of ssh://gregfrost@knoppmyth.net/mount/repository/LinHES-PKGBUILD
Diffstat (limited to 'abs/extra-testing/community/transmission-cli/run.transmissiond')
-rwxr-xr-x | abs/extra-testing/community/transmission-cli/run.transmissiond | 29 |
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/extra-testing/community/transmission-cli/run.transmissiond b/abs/extra-testing/community/transmission-cli/run.transmissiond new file mode 100755 index 0000000..714c946 --- /dev/null +++ b/abs/extra-testing/community/transmission-cli/run.transmissiond @@ -0,0 +1,29 @@ +#!/bin/bash + +. /etc/rc.conf +. /etc/rc.d/functions +. /etc/conf.d/transmissiond + +CONFIGDIR=/home/$TRANS_USER/.config/transmission-daemon +PID=`pidof -o %PPID /usr/bin/transmission-daemon` +# Update the block lists - try to keep the bad guys out. + cd ${CONFIGDIR}/blocklists + if [ $? -eq 0 ]; then + find . -mtime +4 -type f -name level1 -exec rm {} \; + if [ ! -f ${CONFIGDIR}/blocklists/level1 ]; then + # update blocklist + # echo "updating blocklist, ~4MB" + wget -q -O level1.gz http://download.m0k.org/transmission/files/level1.gz + if [ -f level1.gz ]; then + gunzip level1.gz + if [ $? -eq 0 ]; then + chmod go+r level1 + else + rm -f level1* + fi + fi + fi + cd - 2>&1 >/dev/null + fi + stat_runit "Starting Transmission Daemon" + [ -z "$PID" ] && exec su -l -c "/usr/bin/nice -n 19 /usr/bin/transmission-daemon $TRANS_OPTS" $TRANS_USER 2>/dev/null |