#! /bin/sh # Copyright (c) 2000 Ossi # # /sbin/init.d/tunnel # . /etc/rc.config return=$rc_done case "$1" in start) echo -n "Starting SSH mail tunnel: " startproc /usr/local/sbin/tunneld ssh -x -L 50025:irz301:25 -L 50143:irz ;; stop) echo -n "Stopping SSH mail tunnel: " killproc /usr/local/sbin/tunneld || return=$rc_failed ;; restart) $0 stop && $0 start && exit 0 || exit 1 ;; *) echo "Usage: $0 {start|stop|restart}" exit 1 ;; esac echo -e "$return" test "$return" = "$rc_done" || exit 1 exit 0