
proc ::dedup::directory {dir} {
	namespace import ::auto::log

	loop i 0 1 {
		foreach line [split \
		    [exec /mod/webif/html/dedup/dedup -yes -auto $dir] "\n"] {
			log $line 2
		}
	}
	::auto::recalcdir $dir
}

proc ::dedup::rundir {dir} {
	::auto::flagscan $dir dedup ::dedup::directory 0
}

proc ::dedup::run {} {
	::auto::flagscan $::auto::root dedup ::dedup::directory
}

::auto::register dedup 800

