From f1431d4a04e057243f5bf6dfe621092698765693 Mon Sep 17 00:00:00 2001 From: Jonas Smedegaard Date: Fri, 13 Oct 2006 19:03:35 +0000 Subject: New(ly finished) script to invoke (or kill if hung) offlineimap. --- localsyncmail | 18 ++++++++++++++++++ 1 file changed, 18 insertions(+) create mode 100755 localsyncmail (limited to 'localsyncmail') diff --git a/localsyncmail b/localsyncmail new file mode 100755 index 0000000..0a4bdd0 --- /dev/null +++ b/localsyncmail @@ -0,0 +1,18 @@ +#!/bin/sh + +me=$(whoami) +user=${1:-$me} +host=${2:-localhost} + +#pkill -KILL -f offlineimap || nice x-terminal-emulator -e "offlineimap || echo 'Application died - hit return to quit!'; read" +#pkill -KILL -f offlineimap || nice x-terminal-emulator -e \( offlineimap \|\| read \) + +if [ "$user" = "$me" ] && [ "$host" = "localhost" ]; then + command="bash -s" +else + command="ssh -C -X $user@$host bash -s" +fi + +echo "pkill -u $user offlineimap || offlineimap" | $command + +exit 0 -- cgit v1.2.3