Rename and adjust cron task (Ajaxplorer -> Pydio)

tags/0.2.0
Daniel Berteaud 11 years ago
parent 8d75f28ec6
commit 741270d1bb
  1. 3
      root/etc/cron.daily/ajaxplorer-tmpwatch
  2. 10
      root/etc/cron.daily/pydio-indexer
  3. 3
      root/etc/cron.daily/pydio-tmpwatch

@ -1,3 +0,0 @@
#!/bin/sh
/usr/sbin/tmpwatch 24 /var/lib/ajaxplorer/tmp/

@ -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 </var/cache/ajaxplorer/indexes/.ajxp_lock-$name>
if (-e "/var/cache/pydio/indexes/.ajxp_lock-$name"){
my $mtime = stat("/var/cache/pydio/indexes/.ajxp_lock-$name")->mtime;
unlink </var/cache/pydio/indexes/.ajxp_lock-$name>
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 </var/cache/ajaxplorer/indexes/.ajxp_lock-$name>;
unlink </var/cache/pydio/indexes/.ajxp_lock-$name>;
}
# We should now restart OOo to release memory
if (-d '/var/service/ooo'){

@ -0,0 +1,3 @@
#!/bin/sh
/usr/sbin/tmpwatch 24 /var/lib/pydio/tmp/
Loading…
Cancel
Save