-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathbootup.sh
More file actions
executable file
·29 lines (24 loc) · 914 Bytes
/
bootup.sh
File metadata and controls
executable file
·29 lines (24 loc) · 914 Bytes
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
#/bin/bash
SQL_USER='site'
SQL_PASS='password'
SQL_NAME='site'
SQL_IP=$MYSQL_PORT_3306_TCP_ADDR
mysql -h$SQL_IP -uroot -p$MYSQL_ENV_MYSQL_ROOT_PASSWORD -e "CREATE USER $SQL_USER@'%' IDENTIFIED BY '$SQL_PASS'; GRANT ALL PRIVILEGES ON * . * TO $SQL_USER@'%' IDENTIFIED BY '$SQL_PASS'; CREATE DATABASE IF NOT EXISTS $SQL_NAME"
echo "<?php \$databases = array (
'default' =>
array (
'default' =>
array (
'database' => '$SQL_NAME',
'username' => '$SQL_USER',
'password' => '$SQL_PASS',
'host' => '$SQL_IP',
'port' => '3306',
'driver' => 'mysql',
'prefix' => false,
),
),
);
\$drupal_hash_salt = ''; " > /var/www/html/site/sites/default/settings.php
sed -i "s/.*127.0.0.1.*/"'$base_url'"= \"http:\/\/$API_PORT_80_TCP_ADDR\/api.php\";/g" /var/www/html/site/sites/all/modules/CheckoutCrypto/ccAccount/includes/cc-php/cc.inc
/usr/sbin/apache2ctl -D FOREGROUND