This page (revision-1) was last changed on 29-Nov-2024 16:16 by UnknownAuthor

Only authorized users are allowed to rename pages.

Only authorized users are allowed to delete pages.

Page revision history

Version Date Modified Size Author Changes ... Change note

Page References

Incoming links Outgoing links

Version management

Difference between version and

At line 1 added 182 lines
!! Warning
This was originally done on 3.0 on Linux and will need to be modified for your specific implementations and for some paths that may have changed.
The concept and implementation has been done on 3.1.2 with some minor modifications.
The Steps to make this happen are:
* Upgrade the one of the IDPs first.
* Put all your "custom" files in place on this IDP.
* Login to Console as root of this IDP.
* Issue these commands:
** ssh-agent bash
** ssh-add /root/.ssh/id_dsa
* run this script: /root/scripts/shw-customcopy.sh
!! SP4
This worked as of Version 3 SP4
The script will copy the files from su-nam.willeke.com to the proper location on the vairious hosts identified within the script.
! The Script
{{{
#!/bin/bash
#
# SCRIPT: shw-customcopy
# AUTHOR: noone@mx.willeke.com
# DATE: 10/22/2008 2:24:56 PM
# REV: 1.1.b (Valid are A, B, D, T, Q, and P)
# (For Alpha, Beta, Dev, Test, QA, and Production)
#
# PLATFORM: Runs only from su-nam.willeke.com (Where the keys were setup)
#
# REQUIREMENTS:
# Works on NAM 3.0 SP4
# WILL NOT WORK ON 3.1 ************************
# ssh Keys must be exchanged first!
# so there is no prompting for authentication,
# The Each time run these form command line first!:
# ssh-agent bash
# ssh-add /root/.ssh/id_dsa
#
# PURPOSE: Copies the images as installed on the first IDP to all listed devices.
# then sets proper ownership
# then clears old-jsps
#
# REV LIST:
# DATE: 1/22/2009 2:27:39 PM
# BY: noone@mx.willeke.com
# MODIFICATION:
# updated for the new lags for XXXX
#
# set -n # Uncomment to check script syntax, without execution.
# # NOTE: Do not forget to put the # comment back in or
# # the shell script will never execute!
# set -x # Uncomment to debug this shell script
#
##########################################################
# DEFINE FILES AND VARIABLES HERE
##########################################################
THIS_SCRIPT=$(basename $0)
IDPIMAGES=/var/opt/novell/tomcat4/webapps/nidp/images
IDPJSPS=/var/opt/novell/tomcat4/webapps/nidp/jsp
IDPOLD=/var/opt/novell/tomcat4/work/Standalone/localhost/nidp/jsp
LAGIMAGES=/opt/novell/nesp/lib/webapp/images
LAGJSPS=/opt/novell/nesp/lib/webapp/jsp
LAGOLD=/var/opt/novell/tomcat4/work/Standalone/localhost/nesp/jsp
##########################################################
# DEFINE FUNCTIONS HERE
##########################################################
##########################################################
# BEGINNING OF MAIN
##########################################################
echo $THIS_SCRIPT
# Clear old files on su-nam.willeke.com
rm $IDPOLD/*.*
### Use this block for each IDP Changing the h1 value.
h1=su-nam2.willeke.com
echo -e "************* processing $h1 *****************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$IDPIMAGES/
ssh $h1 chown novlwww:novlwww $IDPIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$IDPJSPS/
ssh $h1 chown novlwww:novlwww $IDPJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear the pre-compiled jsp files from the server"
ssh $h1 rm $IDPOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
### REPEAT this block for each LAG Changing the h1 value.
h1=su-lagappprd01.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo Clear old pre-compiled jsp files from the server
ssh $h1 rm $LAGOLD/*.*
echo finished $h1
echo "************************************************************\n"
h1=su-lagappprd02.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear old pre-compiled jsp files from the server"
ssh $h1 rm $LAGOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
h1=su-lagappprd03.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear old pre-compiled jsp files from the server"
ssh $h1 rm $LAGOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
h1=su-lagappprd04.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear old pre-compiled jsp files from the server"
ssh $h1 rm $LAGOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
h1=su-lagappprd05.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear old pre-compiled jsp files from the server"
ssh $h1 rm $LAGOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
h1=su-lagappprd06.willeke.com
echo -e "************************* processing $h1 *************"
echo -e "copy images"
scp -p $IDPIMAGES/*.* $h1:$LAGIMAGES/
ssh $h1 chown novlwww:novlwww $LAGIMAGES/*.*
echo -e "copy jsps"
scp -p $IDPJSPS/*.* $h1:$LAGJSPS/
ssh $h1 chown novlwww:novlwww $LAGJSPS/*.*
# Clears the pre-compiled jsp files from the server
echo -e "Clear old pre-compiled jsp files from the server"
ssh $h1 rm $LAGOLD/*.*
echo -e "finished $h1"
echo -e "************************************************************\n"
echo -e "************************ exiting **************************\n"
# End of script
}}}