entrypoint.sh 398 B

12345678910111213141516
  1. #!/bin/sh
  2. pbs_conf_file=/etc/pbs.conf
  3. mom_conf_file=/var/spool/pbs/mom_priv/config
  4. hostname=$(hostname)
  5. # replace hostname in pbs.conf and mom_priv/config
  6. sed -i "s/PBS_SERVER=.*/PBS_SERVER=$hostname/" $pbs_conf_file
  7. sed -i "s/\$clienthost .*/\$clienthost $hostname/" $mom_conf_file
  8. # start PBS Pro
  9. /etc/init.d/pbs start
  10. # create default non-root user
  11. adduser pbsuser && su - pbsuser
  12. exec "$@"