Fix imapproxy_multi

- Added imapproxy.conf as parameter as pimpstat won't work without
- Added unversal_newlines as Popen parameter because otherwise it's binary output
This commit is contained in:
Sebastian L 2022-08-31 09:02:49 +02:00 committed by Kenyon Ralph
parent eea45ab34b
commit 2f14a9b31e
1 changed files with 3 additions and 2 deletions

View File

@ -79,9 +79,10 @@ def print_fetch():
connections_created = 0
connections_reused = 0
connections = Popen(
"pimpstat -c | egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
"/usr/sbin/pimpstat -f /etc/imapproxy.conf -c | /usr/bin/egrep '(Total (Reused|Created)|Cache (Hits|Misses))'",
shell=True,
stdout=PIPE
stdout=PIPE,
universal_newlines=True
)
for line in connections.stdout:
if re.search(r'Hits', line):