#!/sbin/sh # # # Script to start the redirector. This script is written to work # with the tunnel.pl file that can be downloaded from CPAN # # Change all appropriate values: # TUNNEL_HOME, NON_SECURE_PORT, and SECURE_PORT # NON_SECURE_PORT and SECURE_PORT are the port numbers # that you have tomcat accepting connections on. # # You might also need to modify the 'kill' command for your system # # TUNNEL_HOME=/PATH/TO/REDIRECT/SCRIPT NON_SECURE_PORT=8080 SECURE_PORT=8443 case "$1" in start) cmdtext="starting" echo "webTunnel $cmdtext." ${TUNNEL_HOME}/tunnel.pl -port 80 -toport $NON_SECURE_PORT & ${TUNNEL_HOME}/tunnel.pl -port 443 -toport $SECURE_PORT & ;; stop) cmdtext="stopping" echo "webTunnel $cmdtext." /usr/bin/pkill -x -u 0 -P 1 tunnel.pl ;; *) echo "Usage: $0 {start|stop}" exit 1 ;; esac exit 0