[debian-mysql] Bug#830976: Bug#830976: logrotate failures if mysql server is not running

Michael Biebl biebl at debian.org
Wed Jul 13 14:22:44 UTC 2016


Am 13.07.2016 um 16:08 schrieb Otto Kekäläinen:
> Hello!
> 
> Thanks for looking into the issue. The file is at
> http://anonscm.debian.org/cgit/pkg-mysql/mariadb-10.0.git/tree/debian/mariadb-server-10.0.mysql-server.logrotate
> and as you can see, it should check if if the pid file is found or
> not, and thus if your mysqld daemon is running or not. Apparently this
> check fails on your machine..?
> 
> Can you check what is the error message or other symptom?
> 

# systemctl status mysql
● mysql.service - LSB: Start and stop the mysql database server daemon
   Loaded: loaded (/etc/init.d/mysql; generated; vendor preset: enabled)
   Active: inactive (dead)
     Docs: man:systemd-sysv-generator(8)

# if [ -f `my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"` ];
then echo yes ; fi
yes

# my_print_defaults --mysqld | grep -oP "pid-file=\K[^$]+"
→ nothing
# [ -f  ] && echo yes
yes

You might quote the return of your commands, then this should make the
test fail:

# [ -f "" ] && echo yes || echo no
no

-- 
Why is it that all of the instruments seeking intelligent life in the
universe are pointed away from Earth?

-------------- next part --------------
A non-text attachment was scrubbed...
Name: signature.asc
Type: application/pgp-signature
Size: 819 bytes
Desc: OpenPGP digital signature
URL: <http://lists.alioth.debian.org/pipermail/pkg-mysql-maint/attachments/20160713/a6af9ae6/attachment.sig>


More information about the pkg-mysql-maint mailing list