configure.sh 1.0 KB

12345678910111213141516171819202122232425262728293031323334
  1. start_server()
  2. {
  3. echo "Starting server ..................."
  4. /opt/IBM/WebSphere/AppServer/profiles/$PROFILE_NAME/bin/startServer.sh $SERVER_NAME
  5. }
  6. stop_server()
  7. {
  8. echo "Stopping server ..................."
  9. kill -s INT $PID
  10. }
  11. echo "Setting Password"
  12. /work/set_password.sh
  13. start_server
  14. echo "Retrieving Signers"
  15. /opt/IBM/WebSphere/AppServer/profiles/$PROFILE_NAME/bin/retrieveSigners.sh NodeDefaultTrustStore ClientDefaultTrustStore -autoAcceptBootstrapSigner
  16. echo "Setting Keystore Password"
  17. /work/set_keystore_password.sh
  18. PID=$(ps -C java -o pid= | tr -d " ")
  19. echo "Applying configuration"
  20. if [ ! -z "$1" ]; then
  21. /work/run_py_script.sh "$@"
  22. elif [ ! -z "$(ls /work/config)" ]; then
  23. echo "+ Found config-files under /work/config. Executing..."
  24. find /work/config -name "*.py" -print0 | sort -z | xargs -0 -n 1 -r /work/run_py_script.sh
  25. fi
  26. /work/applyConfig.sh
  27. stop_server
  28. find /opt/IBM -user was ! -perm -g=w -print0 | xargs -0 -r chmod g+w
  29. find /opt/IBM -type d -user was ! -perm -g=x -print0 | xargs -0 -r chmod g+x