From 26e369dccc4744f55bb396707e8cf72e01b9c514 Mon Sep 17 00:00:00 2001 From: Ilia Ross Date: Sun, 2 Aug 2026 23:05:58 +0200 Subject: [PATCH] Fix to avoid site cache writes in cron context https://github.com/virtualmin/virtualmin-gpl/issues/1221 --- proftpd/proftpd-lib.pl | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) diff --git a/proftpd/proftpd-lib.pl b/proftpd/proftpd-lib.pl index fe816fee1..5a13c14ab 100755 --- a/proftpd/proftpd-lib.pl +++ b/proftpd/proftpd-lib.pl @@ -43,7 +43,11 @@ if ($oldsite{'size'} != $st[7] || } } } -&refresh_site_cache(); + +# Avoid cache writes from non-interactive commands on systemd systems +unless ($main::webmin_script_type eq 'cron' && -d '/run/systemd/system') { + &refresh_site_cache(); + } # Load the site-specific information on the server executable &read_file("$module_config_directory/site", \%site);