Skip to content

Commit 3a17dbf

Browse files
committed
restructure inits and rewrite config setup
1 parent a9862d6 commit 3a17dbf

File tree

2 files changed

+15
-15
lines changed

2 files changed

+15
-15
lines changed

init/30_config.sh

Lines changed: 15 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,15 @@
1+
#!/bin/bash
2+
3+
# make folders if required
4+
mkdir -p "$DATADIR" /var/run/mysqld /config/log/mysql
5+
6+
# configure my.cnf and mysqld_safe
7+
sed -i 's/key_buffer\b/key_buffer_size/g' /etc/mysql/my.cnf
8+
sed -ri 's/^(bind-address|skip-networking)/;\1/' /etc/mysql/my.cnf
9+
sed -i s#/var/log/mysql#/config/log/mysql#g /etc/mysql/my.cnf
10+
sed -i -e 's/\(user.*=\).*/\1 abc/g' /etc/mysql/my.cnf
11+
sed -i -e "s#\(datadir.*=\).*#\1 $DATADIR#g" /etc/mysql/my.cnf
12+
sed -i "s/user='mysql'/user='abc'/g" /usr/bin/mysqld_safe
13+
14+
# set permissions
15+
chmod -R 777 /var/run/mysqld

init/30_set_our_folders.sh

Lines changed: 0 additions & 15 deletions
This file was deleted.

0 commit comments

Comments
 (0)