blob: 03dc1d2880c602d092c1d88e7a71a0392a9172be (
plain)
- #!/bin/sh
- me=$(whoami)
- user=$1
- if [ -n "$user" ]; then
- host=$2
- if [ -n "$host" ]; then
- shift 2
- else
- host=localhost
- shift
- fi
- else
- user=$me
- fi
- if [ "$user" = "$me" ] && [ "$host" = "localhost" ]; then
- pkill -u $user offlineimap || [ $? -lt 2 ]
- offlineimap $@
- else
- ssh -C -X -e none $user@$host pkill -u $user offlineimap || [ $? -lt 2 ]
- ssh -C -X -e none -tt $user@$host offlineimap $@
- fi
- exit 0
|