123456789101112131415161718192021222324252627282930313233343536373839404142434445 |
- TSOCKS="`which tsocks`"
- if [ ! -x "$TSOCKS" ]
- then
- echo "$0: Can't find tsocks in PATH. Perhaps you haven't installed it?" >&2
- exit 1
- fi
- if [ "$#" = 0 ]
- then
- echo "Usage: $0 <command> [<options>...]" >&2
- exit 1
- fi
- if [ "$#" = 1 ] && ( [ "$1" = "-h" ] || [ "$1" = "--help" ] )
- then
- echo "Usage: $0 <command> [<options>...]"
- exit 0
- fi
- TSOCKS_CONF_FILE="@CONFDIR@/tor-tsocks.conf"
- export TSOCKS_CONF_FILE
- if [ -r "$TSOCKS_CONF_FILE" ]
- then
- exec tsocks "$@"
- echo "$0: Failed to exec tsocks $@" >&2
- exit 1
- else
- echo "$0: Missing tsocks configuration file \"$TSOCKS_CONF_FILE\"." >&2
- exit 1
- fi
|