summaryrefslogtreecommitdiff
path: root/localsyncmail
blob: 0a4bdd0c6164763ebdd654744533aa765d754c95 (plain)
  1. #!/bin/sh
  2. me=$(whoami)
  3. user=${1:-$me}
  4. host=${2:-localhost}
  5. #pkill -KILL -f offlineimap || nice x-terminal-emulator -e "offlineimap || echo 'Application died - hit return to quit!'; read"
  6. #pkill -KILL -f offlineimap || nice x-terminal-emulator -e \( offlineimap \|\| read \)
  7. if [ "$user" = "$me" ] && [ "$host" = "localhost" ]; then
  8. command="bash -s"
  9. else
  10. command="ssh -C -X $user@$host bash -s"
  11. fi
  12. echo "pkill -u $user offlineimap || offlineimap" | $command
  13. exit 0