From 96879fa608d1370608332ef1c8c642c7c2190d0d Mon Sep 17 00:00:00 2001 From: Sergey Orlov Date: Thu, 4 Mar 2021 21:21:38 +0100 Subject: [PATCH] specify full path for exportfs The autocleaner.py is executed by cron which sets path to PATH=/usr/bin:/bin. As exportfs is in /usr/sbin it must have full path specified, otherwise the script is crashing and fails to clean up old jobs directories Fixes #422 --- autocleaner.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/autocleaner.py b/autocleaner.py index 8efa273d..f87e6d8b 100644 --- a/autocleaner.py +++ b/autocleaner.py @@ -149,7 +149,7 @@ def prune_exports_file(prune_dirs): exports.close() # sync exportfs before deleting the folders - subprocess.run(['exportfs', '-ar'], timeout=TIMEOUT) + subprocess.run(['/usr/sbin/exportfs', '-ar'], timeout=TIMEOUT) return entries_deleted