Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
D
drupalci_environments
Manage
Activity
Members
Labels
Plan
Wiki
Custom issue tracker
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Model registry
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
project
drupalci_environments
Commits
de898f52
Commit
de898f52
authored
11 months ago
by
Andrey Postnikov
Browse files
Options
Downloads
Patches
Plain Diff
DB: mariadb no restart
parent
29754c42
No related branches found
No related tags found
No related merge requests found
Pipeline
#180440
passed
11 months ago
Stage: build
Changes
1
Pipelines
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
db/mariadb-10.6/conf/startup.sh
+19
-5
19 additions, 5 deletions
db/mariadb-10.6/conf/startup.sh
with
19 additions
and
5 deletions
db/mariadb-10.6/conf/startup.sh
+
19
−
5
View file @
de898f52
#!/bin/bash
terminate
()
{
echo
"Caught termination signal, shutting down..."
if
[
-n
"
${
PID
}
"
]
;
then
kill
-TERM
"
${
PID
}
"
wait
"
${
PID
}
"
fi
echo
"Shutdown complete."
exit
0
}
trap
terminate SIGTERM SIGINT
if
[
!
-f
/var/lib/mysql/ibdata1
]
;
then
echo
"rebuilding /var/lib/mysql/ibdata1"
...
...
@@ -12,10 +24,12 @@ if [ ! -f /var/lib/mysql/ibdata1 ];
mysql
-e
"CREATE USER 'drupaltestbot'@'%' IDENTIFIED BY 'drupaltestbotpw';"
mysql
-e
"GRANT ALL PRIVILEGES ON *.* TO 'drupaltestbot'@'%' WITH GRANT OPTION; SELECT User FROM mysql.user; FLUSH PRIVILEGES;"
echo
"Grants added"
killall mysqld
wait
${
PID
}
fi
/usr/bin/mysqld_safe
;
echo
"mysql died at
$(
date
)
"
;
# Start MySQL server if container restart and data is ready
if
[
-z
"
${
PID
}
"
]
;
then
/usr/bin/mysqld_safe &
PID
=
"
${
!
}
"
fi
wait
${
PID
}
echo
"mysql exited at
$(
date
)
"
;
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment