X-Git-Url: http://git.rot13.org/?p=BackupPC.git;a=blobdiff_plain;f=bin%2FBackupPC_trashClean;h=085a4c39c03753932a517f69b865d8bff039f726;hp=edea64ca34253c71f132b8bd8f9933c110b73496;hb=2a19fd178108b0898e79d2b8908236429ca4c6a3;hpb=7dee89bfce659051d486cc66515bb7f22bbc4f09 diff --git a/bin/BackupPC_trashClean b/bin/BackupPC_trashClean index edea64c..085a4c3 100755 --- a/bin/BackupPC_trashClean +++ b/bin/BackupPC_trashClean @@ -1,4 +1,4 @@ -#!/bin/perl -T +#!/bin/perl #============================================================= -*-perl-*- # # BackupPC_trashClean: remove all the files in $TopDir/trash. @@ -11,7 +11,7 @@ # Craig Barratt # # COPYRIGHT -# Copyright (C) 2001 Craig Barratt +# Copyright (C) 2001-2003 Craig Barratt # # This program is free software; you can redistribute it and/or modify # it under the terms of the GNU General Public License as published by @@ -29,14 +29,15 @@ # #======================================================================== # -# Version 2.0.0beta1, released 30 Mar 2003. +# Version 2.1.3, released 21 Jan 2007. # # See http://backuppc.sourceforge.net. # #======================================================================== use strict; -use lib "/usr/local/BackupPC/lib"; +no utf8; +use lib "/usr/local/BackupPC2.1.0/lib"; use BackupPC::Lib; die("BackupPC::Lib->new failed\n") if ( !(my $bpc = BackupPC::Lib->new) ); @@ -51,7 +52,9 @@ $bpc->ChildInit(); ########################################################################### while ( 1 ) { print("processState running\n"); - 1 while ( $bpc->RmTreeTrashEmpty("$TopDir/trash") ); + if ( $bpc->RmTreeTrashEmpty("$TopDir/trash") < 0 ) { + print("log BackupPC_trashClean failed to empty $TopDir/trash\n"); + } print("processState idle\n"); sleep($Conf{TrashCleanSleepSec} || 300); }