diff options
author | Jonas Smedegaard <dr@jones.dk> | 2006-10-13 19:03:35 +0000 |
---|---|---|
committer | Jonas Smedegaard <dr@jones.dk> | 2006-10-13 19:03:35 +0000 |
commit | f1431d4a04e057243f5bf6dfe621092698765693 (patch) | |
tree | c80c2af578d62646c73930db4b9c182001559eec /localsyncmail | |
parent | 275a0cf6d7b1ef35e8a4cfc69988f15bdf5049c4 (diff) |
New(ly finished) script to invoke (or kill if hung) offlineimap.
Diffstat (limited to 'localsyncmail')
-rwxr-xr-x | localsyncmail | 18 |
1 files changed, 18 insertions, 0 deletions
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 |