#!/usr/bin/sh # define executables if [ "$PKGINFO" = "" ]; then PKGINFO=/usr/bin/pkginfo fi if [ "$PKGCHK" = "" ]; then PKGCHK=/usr/sbin/pkgchk fi if [ "$DIRNAME" = "" ]; then DIRNAME=/usr/bin/dirname fi if [ "$GREP" = "" ]; then GREP=/usr/bin/grep fi if [ "$HEAD" = "" ]; then HEAD=/usr/bin/head fi if [ "$CUT" = "" ]; then CUT=/usr/bin/cut fi # initialize environment # define environ vars JWS=SUNWhttp RP_URL="" AP_URL="" # next conditional is from checkinstall # check first to make sure java web server is installed $PKGINFO -q $JWS > /dev/null if [ $? -ne 0 ]; then echo "Java Web Server package: $JWS, Not installed" echo " Aborting..." exit 3 fi while [ 1 ] do echo "-----------------------------------------------------------" echo " SNDesktop Setup" echo "-----------------------------------------------------------" echo "" echo "If you do not accept the default on any field" echo "you must enter a fully qualified url with port" echo "if appropriate. i.e. protocol://machine.domain:port" echo "" echo "" echo "Fully Qualified Domain name of Authentication host: [$FQDNAUTHHOST]: \c" read RESPONSE if [ $RESPONSE ]; then FQDNAUTHHOST=$RESPONSE; AUTH_HOST="`echo $FQDNAUTHHOST | awk -F. '{print $1}'`" fi echo "Authentication port: [$AUTH_PORT]: \c" read RESPONSE if [ $RESPONSE ]; then AUTH_PORT=$RESPONSE; fi echo "Logout URL: [$THE_LOGOUT_URL]: \c" read RESPONSE if [ $RESPONSE ]; then THE_LOGOUT_URL=$RESPONSE; fi PREF_HOST=$FQDNAUTHHOST echo "Preferences host: [$PREF_HOST]: \c" read RESPONSE if [ $RESPONSE ]; then PREF_HOST=$RESPONSE; fi PREF_PORT=$AUTH_PORT echo "Preferences port: [$PREF_PORT]: \c" read RESPONSE if [ $RESPONSE ]; then PREF_PORT=$RESPONSE; fi echo "Preferences URL: [$PREF_URL]: \c"; read RESPONSE if [ $RESPONSE ]; then PREF_URL=$RESPONSE; fi RP_URL=https://$FQDNAUTHHOST:443 while [ 1 ] do echo "Reverse Proxy [$RP_URL]: \c" read RESPONSE if [ $RESPONSE ]; then RP_URL=$RESPONSE fi if [ $RP_URL != "" ]; then break fi done APP_HOST=$FQDNAUTHHOST echo "Application Server Host: [$APP_HOST]: \c" read RESPONSE if [ $RESPONSE ]; then APP_HOST=$RESPONSE; fi APP_PORT=$AUTH_PORT echo "Application Server Port: [$APP_PORT]: \c" read RESPONSE if [ $RESPONSE ]; then APP_PORT=$RESPONSE; fi AP_URL=http://$FQDNAUTHHOST:$AUTH_PORT while [ 1 ] do echo "Application Machine URL [$AP_URL ]: \c" read RESPONSE if [ $RESONSE ]; then AP_URL=$RESPONSE fi if [ "$AP_URL" != "" ]; then break; fi done LOG_HOST=$FQDNAUTHHOST LOG_PORT=$AUTH_PORT while [ 1 ] do echo "Log Server Host: [$LOG_HOST]: \c" read RESPONSE if [ $RESPONSE ]; then LOG_HOST=$RESPONSE; fi echo "Log Server Port: [$LOG_PORT]: \c" read RESPONSE if [ $RESPONSE ]; then LOG_PORT=$RESPONSE; fi if [ "$LOG_PORT" != "" ] && [ "$LOG_HOST" != "" ]; then break; fi done while [ 1 ] do echo "" echo "Change [Y/N]?: \c" read RESPONSE if [ $RESPONSE ]; then UPSHIFT_RESPONSE=`echo $RESPONSE | tr "[:lower:]" "[:upper:]"` if [ $UPSHIFT_RESPONSE = "Y" ]; then QUERY_COMPLETE=0 break; elif [ $UPSHIFT_RESPONSE = "N" ]; then QUERY_COMPLETE=1 break else echo "Answer must be Y/N!" fi fi done if [ $QUERY_COMPLETE -eq 1 ]; then break; fi done cat >$1 <