Advertisement
Guest User

Untitled

a guest
Mar 21st, 2018
410
0
Never
Not a member of Pastebin yet? Sign Up, it unlocks many cool features!
text 4.25 KB | None | 0 0
  1. [root@a45bdc942d18 tuleap-aio]# ./run.sh
  2.  
  3. pushd .
  4. + pushd .
  5. /usr/share/tuleap/tools/docker/tuleap-aio /usr/share/tuleap/tools/docker/tuleap-aio
  6.  
  7. curdir=$(dirname $0)
  8. ++ dirname ./run.sh
  9. + curdir=.
  10. if [ -d $curdir ]; then
  11. cd $curdir;
  12. fi
  13. + '[' -d . ']'
  14. + cd .
  15.  
  16. source mysql-utils.sh
  17. + source mysql-utils.sh
  18. #!/bin/bash
  19.  
  20. set -e
  21. ++ set -e
  22. # Do not leak passwords
  23. set +x
  24. ++ set +x
  25.  
  26. # Starts the DB and upgrade the data
  27. start_mysql() {
  28. if [ -n "$DB_HOST" ]; then
  29. return;
  30. fi
  31. # old password must be disabled for php 5.6 / mysqlnd
  32. sed -i -e 's/^old_passwords\(.*\)/#old_passwords\1/' /etc/my.cnf
  33. codendiadm_pass=$(./interpolate_tuleap_var.php /etc/tuleap/conf/database.inc sys_dbpasswd)
  34.  
  35. echo "Start mysql"
  36. /usr/bin/python /usr/lib/python2.6/site-packages/supervisor/pidproxy.py /var/run/mysqld/mysqld.pid /usr/bin/mysqld_safe &
  37. sleep 1
  38. wait_for_db localhost codendiadm $codendiadm_pass
  39.  
  40. # Update password when switching from old_password
  41. if grep -q '#old_passwords' /etc/my.cnf; then
  42. mysql -ucodendiadm -p$codendiadm_pass -e "SET PASSWORD = PASSWORD('$codendiadm_pass')"
  43. fi
  44. }
  45.  
  46. wait_for_db() {
  47. host=$1
  48. user=$2
  49. password=$3
  50. while ! mysql -h$host -u$user -p$password -e "show databases" >/dev/null; do
  51. echo "Wait for the db"
  52. sleep 1
  53. done
  54. }
  55.  
  56. # Stop Mysql
  57. stop_mysql() {
  58. if [ -n "$DB_HOST" ]; then
  59. return;
  60. fi
  61. echo "Stop mysql"
  62. PID=$(cat /var/run/mysqld/mysqld.pid)
  63. kill -15 $PID
  64. while ps -p $PID >/dev/null 2>&1; do
  65. echo "Waiting for mysql ($PID) to stop"
  66. sleep 1
  67. done
  68. }
  69.  
  70. SUPERVISOR_CONF=$curdir/supervisord.conf
  71. if [ -n "$DB_HOST" ]; then
  72. wait_for_db $DB_HOST root $MYSQL_ROOT_PASSWORD
  73. echo "We got a DB!"
  74. SUPERVISOR_CONF=$curdir/supervisord-nodb.conf
  75. fi
  76.  
  77. TULEAP_INSTALL_TIME="false"
  78. if [ ! -f /data/etc/tuleap/conf/local.inc ]; then
  79. TULEAP_INSTALL_TIME="true"
  80.  
  81. # If tuleap directory is not in data, assume it's first boot and move
  82. # everything in the mounted dir
  83. ./boot-install.sh
  84. fi
  85.  
  86. # Fix path
  87. ./boot-fixpath.sh
  88.  
  89. # Align data ownership with images uids/gids
  90. ./fix-owners.sh
  91. Update data ownership to current image...chown: cannot access `/data/etc/httpd/conf.d/codendi_svnroot.conf': No such file or directory
  92. chown: cannot access `/data/etc/httpd/conf.d/codendi_svnroot.conf.old': No such file or directory
  93. chown: cannot access `/data/lib/tuleap/boomerang': No such file or directory
  94. chown: cannot access `/data/lib/tuleap/forumml': No such file or directory
  95. chown: cannot access `/data/lib/tuleap/trackerv3': No such file or directory
  96. chown: cannot access `/data/lib/tuleap/secure_ftp/*': No such file or directory
  97. chown: cannot access `/data/lib/tuleap/svnroot/*': No such file or directory
  98. chown: cannot access `/data/home/groups/*': No such file or directory
  99. chown: cannot access `/data/lib/tuleap/ftp/pub/*': No such file or directory
  100. DONE !
  101.  
  102. # Update php config
  103. sed -i \
  104. -e "s%^short_open_tag = Off%short_open_tag = On%" \
  105. -e "s%^;date.timezone =%date.timezone = Europe/Paris%" \
  106. /etc/php.ini
  107.  
  108. # Update Postfix config
  109. sed -i \
  110. -e "s%^#myhostname = host.domain.tld%myhostname = $VIRTUAL_HOST%" \
  111. -e "s%^alias_maps = hash:/etc/aliases%alias_maps = hash:/etc/aliases,hash:/etc/aliases.codendi%" \
  112. -e "s%^alias_database = hash:/etc/aliases%alias_database = hash:/etc/aliases,hash:/etc/aliases.codendi%" \
  113. -e "s%^#recipient_delimiter = %recipient_delimiter = %" \
  114. /etc/postfix/main.cf
  115.  
  116. # Update nscd config
  117. perl -pi -e "s%enable-cache[\t ]+group[\t ]+yes%enable-cache group no%" /etc/nscd.conf
  118.  
  119. start_mysql
  120. Start mysql
  121. 180321 06:05:26 mysqld_safe Logging to '/var/lib/mysql/a45bdc942d18.err'.
  122. 180321 06:05:26 mysqld_safe A mysqld process already exists
  123.  
  124. if [ "$TULEAP_INSTALL_TIME" == "false" ]; then
  125. # DB upgrade (after config as we might depends on it)
  126. ./boot-upgrade.sh
  127. fi
  128. PHP Notice: Undefined index: dbdriver in /usr/share/forgeupgrade/forgeupgrade.php on line 115
  129. PHP Notice: Undefined index: dbdriver in /usr/share/forgeupgrade/forgeupgrade.php on line 120
  130. Error: invalid --dbdriver
  131. PHP Fatal error: Class '' not found in /usr/share/forgeupgrade/forgeupgrade.php on line 130
  132. [root@a45bdc942d18 tuleap-aio]#
Advertisement
Add Comment
Please, Sign In to add comment
Advertisement