imapsync: Connect to database via socket
Make the imapsync script connect to mysql via socket and not tcp like all other services do.
Reasoning: consistency. 🤓 And in my case the database does not listen on tcp; just on the socket.
This commit is contained in:
parent
86c4cd37b2
commit
630bce5f29
@ -31,7 +31,7 @@ $DBUSER = '';
|
|||||||
$DBPASS = '';
|
$DBPASS = '';
|
||||||
|
|
||||||
$run_dir="/tmp";
|
$run_dir="/tmp";
|
||||||
$dsn = "DBI:mysql:database=" . $DBNAME . ";host=mysql";
|
$dsn = "DBI:mysql:database=" . $DBNAME . ";mysql_socket=/var/run/mysqld/mysqld.sock";
|
||||||
$lock_file = $run_dir . "/imapsync_busy";
|
$lock_file = $run_dir . "/imapsync_busy";
|
||||||
$lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 1);
|
$lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 1);
|
||||||
$lockmgr->lock($lock_file) || die "can't lock ${lock_file}";
|
$lockmgr->lock($lock_file) || die "can't lock ${lock_file}";
|
||||||
|
Loading…
Reference in New Issue
Block a user