#!/bin/sh
# mewstunnel: stunnel wrapper for Mew
# 
# Author: Tatsuya Kinoshita <tats@vega.ocn.ne.jp>
# Created: 31 Jan 2005
# Revised: 19 Oct 2011
# 
# Copyright (c) 2005-2011 Tatsuya Kinoshita
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted without restriction, with NO WARRANTY.

prog=/usr/sbin/stunnel
for f in "$MEW_PROG_STUNNEL" "`which stunnel4`" /usr/local/sbin/stunnel4 \
    /usr/sbin/stunnel4 "`which stunnel`" /usr/local/sbin/stunnel; do

    if [ -n "$f" ] && [ -x "$f" ]; then
	prog=$f
	break
    fi
done

LC_ALL=C
export LC_ALL

"$prog" "$@"
