From 741270d1bb8e498c149159ebd5218c67b7b8eb62 Mon Sep 17 00:00:00 2001 From: Daniel Berteaud Date: Thu, 17 Oct 2013 17:33:26 +0200 Subject: [PATCH] Rename and adjust cron task (Ajaxplorer -> Pydio) --- root/etc/cron.daily/ajaxplorer-tmpwatch | 3 --- root/etc/cron.daily/{ajaxplorer-indexer => pydio-indexer} | 10 +++++----- root/etc/cron.daily/pydio-tmpwatch | 3 +++ 3 files changed, 8 insertions(+), 8 deletions(-) delete mode 100644 root/etc/cron.daily/ajaxplorer-tmpwatch rename root/etc/cron.daily/{ajaxplorer-indexer => pydio-indexer} (80%) create mode 100644 root/etc/cron.daily/pydio-tmpwatch diff --git a/root/etc/cron.daily/ajaxplorer-tmpwatch b/root/etc/cron.daily/ajaxplorer-tmpwatch deleted file mode 100644 index 43a3d45..0000000 --- a/root/etc/cron.daily/ajaxplorer-tmpwatch +++ /dev/null @@ -1,3 +0,0 @@ -#!/bin/sh - -/usr/sbin/tmpwatch 24 /var/lib/ajaxplorer/tmp/ diff --git a/root/etc/cron.daily/ajaxplorer-indexer b/root/etc/cron.daily/pydio-indexer similarity index 80% rename from root/etc/cron.daily/ajaxplorer-indexer rename to root/etc/cron.daily/pydio-indexer index 98c5930..3a21bd4 100644 --- a/root/etc/cron.daily/ajaxplorer-indexer +++ b/root/etc/cron.daily/pydio-indexer @@ -26,17 +26,17 @@ foreach my $share ($a->get_all_by_prop(type => 'share')){ next if ($ajaxplorer ne 'enabled' || $indexer ne 'enabled'); my $name = $share->key; # Check if the lock file is present and if it's too old (last index crashed ?) - if (-e "/var/cache/ajaxplorer/indexes/.ajxp_lock-$name"){ - my $mtime = stat("/var/cache/ajaxplorer/indexes/.ajxp_lock-$name")->mtime; - unlink + if (-e "/var/cache/pydio/indexes/.ajxp_lock-$name"){ + my $mtime = stat("/var/cache/pydio/indexes/.ajxp_lock-$name")->mtime; + unlink if (time() - $mtime > 18000); } - system('/usr/bin/sudo -u www /usr/bin/php /usr/share/ajaxplorer/cmd.php ' . + system('/usr/bin/sudo -u www /usr/bin/php /usr/share/pydio/cmd.php ' . '-u=RDiin175M40T0cYvXLARpAi+1TsSVkbksEDZ4KvwBuY= '. '-t=e71479ebc4365176d9f09fe957780024 -a=index '. '-r='.$name.' --secure_token='.$id.' --dir=/ --_method=put >/dev/null 2>&1'); # In some cases, the lock file is not removed, make sure it's unlocked - unlink ; + unlink ; } # We should now restart OOo to release memory if (-d '/var/service/ooo'){ diff --git a/root/etc/cron.daily/pydio-tmpwatch b/root/etc/cron.daily/pydio-tmpwatch new file mode 100644 index 0000000..8bda10c --- /dev/null +++ b/root/etc/cron.daily/pydio-tmpwatch @@ -0,0 +1,3 @@ +#!/bin/sh + +/usr/sbin/tmpwatch 24 /var/lib/pydio/tmp/