Skip to content

Commit 616dad3

Browse files
committed
Rename defaults/custom.cnf and cleanup init logic
1 parent 8b1bf40 commit 616dad3

File tree

2 files changed

+3
-11
lines changed
  • root

2 files changed

+3
-11
lines changed
File renamed without changes.

root/etc/s6-overlay/s6-rc.d/init-mariadb-config/run

Lines changed: 3 additions & 11 deletions
Original file line numberDiff line numberDiff line change
@@ -11,17 +11,9 @@ mkdir -p \
1111
sed -i "s|.*skip-networking.*|#skip-networking|g" /etc/my.cnf.d/mariadb-server.cnf
1212

1313
# setup custom cnf file
14-
if [[ ! -f /config/custom.cnf ]]; then
15-
cp /defaults/my.cnf /config/custom.cnf
16-
fi
17-
18-
if [[ ! -L /etc/my.cnf.d/custom.cnf && -f /etc/my.cnf.d/custom.cnf ]]; then
19-
rm /etc/my.cnf.d/custom.cnf
20-
fi
21-
22-
if [[ ! -L /etc/my.cnf.d/custom.cnf ]]; then
23-
ln -s /config/custom.cnf /etc/my.cnf.d/custom.cnf
24-
fi
14+
cp -n /defaults/custom.cnf /config/custom.cnf
15+
rm -rf /etc/my.cnf.d/custom.cnf
16+
ln -s /config/custom.cnf /etc/my.cnf.d/custom.cnf
2517

2618
# set permissions
2719
chmod -R 777 \

0 commit comments

Comments
 (0)