]> git.openstreetmap.org Git - chef.git/blobdiff - cookbooks/tile/templates/default/cleanup-tiles.erb
Place lock file inside the tile directory
[chef.git] / cookbooks / tile / templates / default / cleanup-tiles.erb
index 0f9bff288e16f0027a01828628efe1b5d185c4ca..5a954e2950117687c167a349ee5f3ecb9bef17d3 100644 (file)
@@ -13,7 +13,7 @@ my $tiledir = shift @ARGV;
 
 my $lockmgr = LockFile::Simple->make(-autoclean => 1, -max => 0, -warn => 0);
 
-$lockmgr->lock($tiledir) || exit 0;
+$lockmgr->lock("${tiledir}/cleanup") || exit 0;
 
 my $tempfile = tmpnam();
 
@@ -51,6 +51,6 @@ if (df($tiledir)->{per} > 90)
 
 unlink($tempfile);
 
-$lockmgr->unlock($tiledir);
+$lockmgr->unlock("${tiledir}/cleanup");
 
 exit 0;