diff options
author | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-24 20:05:19 +0900 |
---|---|---|
committer | Sean Whitton <spwhitton@spwhitton.name> | 2015-02-24 20:05:48 +0900 |
commit | c3d9fd85805fe55788839c6d85770a83e0252075 (patch) | |
tree | 53a47a4b4d53005b77f963420b62723c1714b761 | |
parent | 7bcca5f15656716ca3833d9e291f0a5b135ef7b2 (diff) | |
download | dotfiles-c3d9fd85805fe55788839c6d85770a83e0252075.tar.gz |
rt script & crontab it on artemis
rtorrent run-and-maybe-attach script based off old hestia-startup script
crontab on artemis because it's always on a connection where that's okay atm
-rw-r--r-- | .config/cron/swhitton/artemis.silentflame.com | 2 | ||||
-rw-r--r-- | .zshrc | 1 | ||||
-rwxr-xr-x | bin/rt | 15 |
3 files changed, 17 insertions, 1 deletions
diff --git a/.config/cron/swhitton/artemis.silentflame.com b/.config/cron/swhitton/artemis.silentflame.com index 39c83e45..2f48b738 100644 --- a/.config/cron/swhitton/artemis.silentflame.com +++ b/.config/cron/swhitton/artemis.silentflame.com @@ -3,3 +3,5 @@ */15 * * * * chronic doccheckin */10 * * * * chronic offlineimap + +@reboot rt @@ -54,7 +54,6 @@ alias screen="screen -U" # enable UTF-8 alias tmux="tmux" alias rax="screen -URaAx" alias ta="tmux attach" -alias rt="screen -t rtorrent dtach -a $HOME/local/rt/session/dtach.socket" alias blogdates="rdate.py-dir ~/html/blog/entries" alias httpdir="sudo python -m SimpleHTTPServer 80" @@ -0,0 +1,15 @@ +#!/bin/bash + +# start rtorrent under dtach if it's not running + +if ! pgrep -u $LOGNAME rtorrent >/dev/null; then + rm -f $HOME/local/rt/session/dtach.socket + TERM=xterm /usr/bin/nice -n 19 /usr/bin/dtach -n $HOME/local/rt/session/dtach.socket /usr/bin/rtorrent +fi + +# if we're not at a dumb terminal (so this script can be shoved in a +# crontab), try to attach what we (maybe) just made + +if [ -t 1 ]; then + dtach -a $HOME/local/rt/session/dtach.socket +fi |