-
Notifications
You must be signed in to change notification settings - Fork 5
/
run.sh
131 lines (130 loc) · 5.59 KB
/
run.sh
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
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
#create tmp directory if missing
if [ ! -d /data/tmp ]; then
mkdir -p /data/tmp
chmod a=rwx,o+t /data/tmp
fi
# clear default ssl.conf
FILE=/etc/httpd/conf.d/ssl.conf
if [ -f "$FILE" ]; then
echo "$FILE exists"
rm -f $FILE
fi
# clear any stale httpd.pid files
FILE=/var/run/httpd/httpd.pid
if [ -f "$FILE" ]; then
echo "$FILE exists"
rm -f $FILE
fi
# check to see of PathDB MySQL defaults file exists
if [ ! -f "/config/pathdbmysql.cnf" ]; then
cp /build/pathdbmysql.cnf /config/pathdbmysql.cnf
fi
# clear out other stale processes
rm -rf /run/httpd/*
# make sure default drupal settings.php file is there
if [ ! -f /quip/web/sites/default/settings.php ]; then
cp /build/settings.php /quip/web/sites/default
echo "\$settings['hash_salt'] = '`uuidgen`';" >> /quip/web/sites/default/settings.php
fi
cp /config/pathdb/w3-theme-custom.css /quip/web/themes/contrib/d8w3css/css/w3-css-theme-custom
# make sure permissions of pathdb folder are correct
chown -R apache:apache /quip/web/sites/default
chmod -R 770 /quip/web/sites/default
#create pathdb directory if missing
if [ ! -d /data/pathdb ]; then
mkdir -p /data/pathdb
fi
# make sure sync folder exists and set permissions
if [ ! -d /data/pathdb/config/sync ]; then
mkdir -p /data/pathdb/config/sync
chown -R apache:apache /data/pathdb/config/sync
chmod -R 770 /data/pathdb/config/sync
fi
#create files directory if missing
if [ ! -d /data/pathdb/files ]; then
mkdir -p /data/pathdb/files
fi
#create files/wsi directory if missing
if [ ! -d /data/pathdb/files/wsi ]; then
mkdir -p /data/pathdb/files/wsi
fi
# check security
chown apache:apache /data/pathdb
chown -R apache:apache /data/pathdb/config
chown apache:apache /data/pathdb/files
chown apache:apache /data/pathdb/wsi
#create logs directory if missing
if [ ! -d /data/pathdb/logs ]; then
mkdir -p /data/pathdb/logs
chown -R apache:apache /data/pathdb/logs
fi
if [ ! -d /data/pathdb/mysql ]; then
mysql_install_db --force --defaults-file=/config/pathdbmysql.cnf
/usr/bin/mysqld_safe --defaults-file=/config/pathdbmysql.cnf &
until mysqladmin status
do
sleep 3
done
cd /build
tar xvfz mysql.tgz
mysql -u root -e "create database QuIP"
mysql QuIP < mysql
fi
/usr/bin/mysqld_safe --defaults-file=/config/pathdbmysql.cnf &
until mysqladmin status
do
sleep 3
done
#if [ ! -d /quip/config-local ]; then
# mkdir /quip/config-local
# chown -R apache:apache /quip/config-local
#fi
#/quip/vendor/bin/drush -y config:export --destination /quip/config-local
/usr/bin/mysql mysql -v -e "ALTER USER 'root'@'localhost' IDENTIFIED BY ''; flush privileges" > /root/logme
httpd -f /config/httpd.conf
cd /quip/web
/quip/vendor/bin/drush -y theme:install bootstrap
/quip/vendor/bin/drush -y pm:enable css_editor
/quip/vendor/bin/drush -y pm:enable pathauto
/quip/vendor/bin/drush -y pm:enable user_current_paths
/quip/vendor/bin/drush -y pm:uninstall restrict_by_ip
/quip/vendor/bin/drush -y pm:uninstall color
/quip/vendor/bin/drush -y pm:uninstall redirect_after_login
/quip/vendor/bin/drush -y config-set system.theme admin seven
/quip/vendor/bin/drush -y config-set system.theme default bootstrap
/quip/vendor/bin/drush config-delete block.block.bartik_branding
/quip/vendor/bin/drush config-delete block.block.bartik_account_menu
/quip/vendor/bin/drush config-delete block.block.bartik_breadcrumbs
/quip/vendor/bin/drush config-delete block.block.bartik_content
/quip/vendor/bin/drush config-delete block.block.bartik_footer
/quip/vendor/bin/drush config-delete block.block.bartik_help
/quip/vendor/bin/drush config-delete block.block.bartik_local_actions
/quip/vendor/bin/drush config-delete block.block.bartik_local_tasks
/quip/vendor/bin/drush config-delete block.block.bartik_main_menu
/quip/vendor/bin/drush config-delete block.block.bartik_messages
/quip/vendor/bin/drush config-delete block.block.bartik_page_title
/quip/vendor/bin/drush config-delete block.block.bartik_powered
/quip/vendor/bin/drush config-delete block.block.bartik_tools
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_account_menu
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_branding
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_breadcrumbs
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_content
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_help
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_local_actions
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_local_tasks
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_main_menu
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_messages
/quip/vendor/bin/drush config-delete block.block.drupal8_w3css_theme_page_title
/quip/vendor/bin/drush -y theme:uninstall drupal8_w3css_theme
/quip/vendor/bin/drush -y theme:uninstall bartik
/quip/vendor/bin/drush -y pm:uninstall ds_extras ds_switch_view_mode ds
#/quip/vendor/bin/drush config-delete field.storage.node.field_map_type
#mkdir /data/tmp2
#cp -f /quip/config-update/field.storage.node.field_map_type.yml /data/tmp2
#/quip/vendor/bin/drush -y config:import --partial --source /data/tmp2
#/quip/vendor/bin/drush -y config:import --partial --source /quip/config-update/
/quip/vendor/bin/drush -y pm:enable moderated_content_bulk_publish
/quip/vendor/bin/drush -y updatedb
/quip/vendor/bin/drush -y cache-rebuild
/quip/vendor/bin/drush -y user:cancel archon
while true; do sleep 1000; done