#--------- VARIABLE CONFIGURATION ----------# #If you are running a none GNU/Linux dist change these to, LS="ls"; DU="du"; DF="df"; DATE="date" #LS="gls"; DU="gdu"; DF="gdf"; DATE="gdate" #and make sure you have SHELLUTILS/FILEUTILS installed! glFTPd="/glftpd" #Enter the glftpdroot here Ignore="#* Albums_By_* Groups" #Ignored patterns SiteDir="$glFTPd/site" LogDir="$glFTPd/ftp-data/logs" LogFile="$LogDir/autodelete.log" MinimumSpace="5120" #Minimum free diskspace in MB StrictMinimum="YES" #Delete only when MinimumSpace is reached and until it's securely regained UtilizeEmptySpace="YES" #Reallocate empty space in dynamic mode to other sections ManualDrives="/dev/hda2 /dev/hdc1" #Devices for manual (include from /dev, not mount points) RemoveNukes="YES" #YES/NO Autoremove nuked dirs LogVar="AUTODELETE" #Variable put in glftpd.log ManualLimit="1024" #Manual trigger limit NukePattern="_NUKED*" #Pattern of a nuked dir MinNukeHrs="24" #Number of hours to wait before removing nukes Incomplete="[Incomplete]*" #Pattern of an incomplete marker RemoveIncomplete="YES" #Remove errornous incomplete links? SubtractStatic="YES" #YES/NO; Autosubtract static dirs from drives? DisableBot="NO" #Disables Bot Announces DebugBotAnnounce="YES" #Show what bot would have said when running -t? ArchiveExists="RMD" #If an archive object already exists on destination you can do: # RMD: Remove Destination object before moving # RMS: Remove Source and ignore moving # IGN: Ignore object, and put warning in log OnMoveFail="IGN" #if moving fails, might be due to out of space you can: # IGN: Ignore this object and continue execution # CON: Continue execution, which might trigger above rule on next round # NOM: Don't move future objects in runtime (warning for low disk space) # EXT: Exit execution ArchiveFailBot="NO" #On above errors, should we warn on irc announce? #--------- MESSAGE CONFIGURATION ----------# # %b - Bold # Set any message to ="DISABLED" to disable # the announce. Almost each line has it's own # cookies for message customization listed above. # %b is a general cookie. MSG_MANUALSTART="(%bAUTODELETE%b) - Autodelete started." MSG_MANUALHALT="(%bAUTODELETE%b) - Manual start halted. Criterias not met" MSG_AUTOSTART="(%bAUTODELETE%b) - Taking our every 3rd hourly tour deleting things to trim the site space!" # %t - Manual Trigger limit in MB MSG_MANUAL="(%bAUTODELETE%b) - A manual autodelete has been triggered. Looking to see if diskspace is below %b%t%b MB in any section." # %o - Object deleted/moved # %l - Location MSG_THROW="(%bAUTODELETE%b) - Lets throw out %b%o%b from %b%l%b." # + %d - Destination MSG_MOVE="(%bAUTODELETE%b) - Lets move %b%o%b from %b%l%b to %b%d%b." # %e - Error message MSG_MOVE_FAIL="(%bAUTODELETE%b) - Failed to move %b%o%b from %b%l%b to %b%d%b: %e" # %n - Number of objects deleted MSG_END="(%bAUTODELETE%b) - And we're done. %b%n%b item(s) deleted."