set_password.sh 1.1 KB

1234567891011121314151617
  1. #!/bin/bash
  2. #####################################################################################
  3. # #
  4. # Script to set the wsadmin password. #
  5. # If a value exists in /tmp/PASSWORD that value will be used, #
  6. # otherwise a random value will be generated and used (and also #
  7. # persisted in /tmp/PASSWORD). #
  8. # #
  9. # Usage : set_password #
  10. # #
  11. #####################################################################################
  12. ADMIN_USER_NAME=${ADMIN_USER_NAME:-"wsadmin"}
  13. password="wsadmin"
  14. /opt/IBM/WebSphere/AppServer/bin/wsadmin.sh -lang jython -conntype NONE -f /work/updatePassword.py $ADMIN_USER_NAME $password > /dev/null 2>&1
  15. echo $password > /tmp/passwordupdated