X-Git-Url: http://git.tpope.net/?p=tpope-extra.git;a=blobdiff_plain;f=bin%2Faway-actions;h=8515027c7f0f37ce092782c1338dcbaaa3a2bc25;hp=30ad0e4000d5e9848fa8425865275adad0dc2290;hb=3c37f39987545e322eb7ea3dd630904d13519672;hpb=48457d80032cf5c9dfe03c3e28b53b55b6117ad3 diff --git a/bin/away-actions b/bin/away-actions index 30ad0e4..8515027 100755 --- a/bin/away-actions +++ b/bin/away-actions @@ -9,7 +9,7 @@ PATH="$HOME/bin:/usr/bin:/bin" ssh="ssh -a -x -oBatchmode=yes -oSetupTimeOut=20" ulimit -S -u 96 -br=lucille +br="tpope br" if [ -f /tmp/away-actions.pid ]; then oldpid="`cat /tmp/away-actions.pid`" @@ -19,7 +19,7 @@ if [ -f /tmp/away-actions.pid ]; then newpid="`cat /tmp/away-actions.pid`" [ "$newpid" = "$oldpid" ] && kill "$newpid" sleep 1 - if [ -f /tmp/away-actions.pid && "`cat /tmp/away-actions.pid`" = "$oldpid" ]; then + if [ -f /tmp/away-actions.pid && "x`cat /tmp/away-actions.pid`" = "x$oldpid" ]; then kill -9 "$oldpid" rm /tmp/away-actions.pid elif [ -f /tmp/away-actions.pid ]; then @@ -53,15 +53,15 @@ esac find /tmp -name .tpope_lights -maxdepth 1 -mmin 60 -exec rm {} \; if [ "$is_away" = 1 -a ! -f /tmp/.tpope_lights ]; then touch /tmp/.tpope_lights - $ssh $br br -F -F + $br -F -F ulimit -S -u 92 for host in buster; do ping -c 1 $host >/dev/null && $ssh $host tpope xssc -lock 2>/dev/null & done elif [ "$is_away" = 0 -a -f /tmp/.tpope_lights ]; then - $ssh $br br -n 4 + $br -n 4 rm -f /tmp/.tpope_lights - $ssh $br br -n 4 + $br -n 4 ulimit -S -u 92 # for host in lucille; do # ping -c 1 $host >/dev/null && $ssh $host tpope unlock @@ -84,7 +84,7 @@ else echo "$information" > "$HOME/.plan" fi -for host in gob barry lucille buster oscar; do +for host in michael lucille buster oscar; do ping -c 1 $host >/dev/null && scp -q "$HOME/.status" $host: 2>/dev/null done