We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 7356fb7 commit 7a5145eCopy full SHA for 7a5145e
scripts/systemd/mysqld_pre_systemd.in
@@ -48,10 +48,11 @@ install_db () {
48
49
[ -d "$datadir" ] || install -d -m 0751 -o@MYSQLD_USER@ -g@MYSQLD_USER@ "$datadir" || exit 1
50
51
- if [ ! -e "$log" -a ! -h "$log" -a -O "$(dirname "$log")" ]; then
52
- touch "$log"
53
- chmod 0640 "$log"
54
- chown @MYSQLD_USER@:@MYSQLD_USER@ "$log" || exit 1
+ if [ ! -e "$log" -a ! -h "$log" -a x$(dirname "$log") = "x/var/log" ]; then
+ case $(basename "$log") in
+ mysql*.log) install /dev/null -m0640 -o@MYSQLD_USER@ -g@MYSQLD_USER@ "$log" ;;
+ *) ;;
55
+ esac
56
fi
57
58
if [ -x /usr/sbin/restorecon ]; then
0 commit comments