| 1 | #!/bin/sh |
| 2 | # mewstunnel: stunnel wrapper for Mew |
| 3 | # |
| 4 | # Author: Tatsuya Kinoshita <[email protected]> |
| 5 | # Created: 31 Jan 2005 |
| 6 | # Revised: 03 Sep 2014 |
| 7 | # |
| 8 | # Copyright (c) 2005-2014 Tatsuya Kinoshita |
| 9 | # |
| 10 | # Redistribution and use in source and binary forms, with or without |
| 11 | # modification, are permitted without restriction, with NO WARRANTY. |
| 12 | # You may regard this as a work that is placed in the public domain. |
| 13 | |
| 14 | prog=/usr/sbin/stunnel |
| 15 | for f in "$MEW_PROG_STUNNEL" "`command -v stunnel4`" /usr/local/sbin/stunnel4 \ |
| 16 | /usr/sbin/stunnel4 "`command -v stunnel`" /usr/local/sbin/stunnel; do |
| 17 | |
| 18 | if [ -n "$f" ] && [ -x "$f" ]; then |
| 19 | prog=$f |
| 20 | break |
| 21 | fi |
| 22 | done |
| 23 | |
| 24 | LC_ALL=C |
| 25 | export LC_ALL |
| 26 | |
| 27 | "$prog" "$@" |