summaryrefslogtreecommitdiffstats
path: root/abs/extra/community/transmission-cli/run.transmissiond
diff options
context:
space:
mode:
authorJames Meyer <james.meyer@operamail.com>2010-08-30 22:26:00 (GMT)
committerJames Meyer <james.meyer@operamail.com>2010-08-30 22:26:00 (GMT)
commit1f175a7b07b9553ce98d0546ac04dbb925ec0bc9 (patch)
treec969070115611a8a75f23d468aa5e0cf86a08121 /abs/extra/community/transmission-cli/run.transmissiond
parentc4bd4457b5d640e1c8f5afbca7cd54c53691e5fc (diff)
downloadlinhes_pkgbuild-1f175a7b07b9553ce98d0546ac04dbb925ec0bc9.zip
linhes_pkgbuild-1f175a7b07b9553ce98d0546ac04dbb925ec0bc9.tar.gz
linhes_pkgbuild-1f175a7b07b9553ce98d0546ac04dbb925ec0bc9.tar.bz2
RESYNC EXTRA:
synced extra-testing -> extra repo Signed-off-by: James Meyer <james.meyer@operamail.com>
Diffstat (limited to 'abs/extra/community/transmission-cli/run.transmissiond')
-rwxr-xr-xabs/extra/community/transmission-cli/run.transmissiond29
1 files changed, 29 insertions, 0 deletions
diff --git a/abs/extra/community/transmission-cli/run.transmissiond b/abs/extra/community/transmission-cli/run.transmissiond
new file mode 100755
index 0000000..714c946
--- /dev/null
+++ b/abs/extra/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