Skip to content
Projects
Groups
Snippets
Help
Loading...
Help
Support
Submit feedback
Contribute to GitLab
Sign in
Toggle navigation
Q
qg-docker-entrypoints
Project
Project
Details
Activity
Releases
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Boards
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
QA
qg-docker-entrypoints
Commits
fe99149a
Commit
fe99149a
authored
Apr 19, 2018
by
kalvin
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
fixbugs
parent
f9113386
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
57 additions
and
13 deletions
+57
-13
test.sh
dev/common/mysql/test.sh
+57
-13
No files found.
dev/common/mysql/test.sh
View file @
fe99149a
...
@@ -4,19 +4,6 @@
...
@@ -4,19 +4,6 @@
###
###
DEBUG_COMMANDS
=
0
DEBUG_COMMANDS
=
0
curl
-o
/etc/my.cnf http://192.168.3.60/QA/qg-docker-entrypoints/raw/master/dev/common/mysql/my.cnf
source
~/.bash_profile
echo
"cd /home/qg-xterm/;git pull;cd -"
cd
/home/qg-xterm/
;
git pull
;
cd
-
echo
"node /home/qg-xterm/demo/app.js"
nohup
node /home/qg-xterm/demo/app.js &
###
###
### Functions
### Functions
###
###
...
@@ -120,8 +107,65 @@ set_mysql_custom_settings() {
...
@@ -120,8 +107,65 @@ set_mysql_custom_settings() {
fi
fi
}
}
init
()
{
export
MY_USER
=
"mysql"
export
MY_GROUP
=
"mysql"
export
MY_UID
=
"48"
export
MY_GID
=
"48"
export
MYSQL_DEF_DAT
=
"/var/lib/mysql"
export
MYSQL_DEF_LOG
=
"/var/log/mysql"
export
MYSQL_DEF_PID
=
"/var/run/mysqld"
export
MYSQL_DEF_SCK
=
"/var/sock/mysqld"
export
MYSQL_LOG_SLOW
=
"
${
MYSQL_DEF_LOG
}
/slow.log"
export
MYSQL_LOG_ERROR
=
"
${
MYSQL_DEF_LOG
}
/error.log"
export
MYSQL_LOG_QUERY
=
"
${
MYSQL_DEF_LOG
}
/query.log"
groupadd
-g
${
MY_GID
}
-r
${
MY_GROUP
}
&&
\
adduser
${
MY_USER
}
-u
${
MY_UID
}
-M
-s
/sbin/nologin
-g
${
MY_GROUP
}
run
"curl -o /etc/my.cnf http://192.168.3.60/QA/qg-docker-entrypoints/raw/master/dev/common/mysql/my.cnf"
run
"rm -rf
${
MYSQL_BASE_INCL
}
"
run
"rm -rf
${
MYSQL_CUST_INCL1
}
"
run
"rm -rf
${
MYSQL_CUST_INCL2
}
"
run
"rm -rf
${
MYSQL_DEF_DAT
}
"
run
"rm -rf
${
MYSQL_DEF_SCK
}
"
run
"rm -rf
${
MYSQL_DEF_PID
}
"
run
"rm -rf
${
MYSQL_DEF_LOG
}
"
run
"mkdir -p
${
MYSQL_BASE_INCL
}
"
run
"mkdir -p
${
MYSQL_CUST_INCL1
}
"
run
"mkdir -p
${
MYSQL_CUST_INCL2
}
"
run
"mkdir -p
${
MYSQL_DEF_DAT
}
"
run
"mkdir -p
${
MYSQL_DEF_SCK
}
"
run
"mkdir -p
${
MYSQL_DEF_PID
}
"
run
"mkdir -p
${
MYSQL_DEF_LOG
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_BASE_INCL
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_CUST_INCL1
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_CUST_INCL2
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_DEF_DAT
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_DEF_SCK
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_DEF_PID
}
"
run
"chown -R
${
MY_USER
}
:
${
MY_GROUP
}
${
MYSQL_DEF_LOG
}
"
run
"chmod 0775
${
MYSQL_BASE_INCL
}
"
run
"chmod 0775
${
MYSQL_CUST_INCL1
}
"
run
"chmod 0775
${
MYSQL_CUST_INCL2
}
"
run
"chmod 0775
${
MYSQL_DEF_DAT
}
"
run
"chmod 0775
${
MYSQL_DEF_SCK
}
"
run
"chmod 0775
${
MYSQL_DEF_PID
}
"
run
"chmod 0775
${
MYSQL_DEF_LOG
}
"
}
################################################################################
# INIT
################################################################################
init
()
################################################################################
################################################################################
# BOOTSTRAP
# BOOTSTRAP
...
...
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment