improof DB Clean
This commit is contained in:
parent
7931150ca2
commit
3d541dd359
@ -22,6 +22,7 @@
|
|||||||
readonly TTSYNC_REMOTE=2
|
readonly TTSYNC_REMOTE=2
|
||||||
readonly TTSYNC_DEL=3
|
readonly TTSYNC_DEL=3
|
||||||
readonly globalconf="/etc/tt/global"
|
readonly globalconf="/etc/tt/global"
|
||||||
|
[ -z "$DEBUG" ] && readonly DEBUG=$FALSE
|
||||||
}
|
}
|
||||||
|
|
||||||
{ #get options & args
|
{ #get options & args
|
||||||
|
@ -14,7 +14,7 @@
|
|||||||
readonly TTSYNC_REMOTE=2 #file exists remote - not used jet
|
readonly TTSYNC_REMOTE=2 #file exists remote - not used jet
|
||||||
readonly TTSYNC_DEL=3 #local file deleted
|
readonly TTSYNC_DEL=3 #local file deleted
|
||||||
readonly globalconf="/etc/tt/global"
|
readonly globalconf="/etc/tt/global"
|
||||||
readonly DEBUG=$FALSE
|
[ -z "$DEBUG" ] && readonly DEBUG=$FALSE
|
||||||
}
|
}
|
||||||
|
|
||||||
{ #get options & args
|
{ #get options & args
|
||||||
@ -64,7 +64,7 @@ function main() {
|
|||||||
|
|
||||||
#clean DB from old stuff
|
#clean DB from old stuff
|
||||||
{
|
{
|
||||||
db_query "DELETE From File WHERE Size=0 OR MD5='' OR MD5 IS NULL OR Name='';"
|
db_query "DELETE From File WHERE (Size=0 OR Size IS NULL OR MD5='' OR MD5 IS NULL OR Name='') AND (TTSync=$TTSYNC_EXIST OR TTSync=$TTSYNC_BACKUP);"
|
||||||
#find dublicates !
|
#find dublicates !
|
||||||
}
|
}
|
||||||
|
|
||||||
|
Loading…
Reference in New Issue
Block a user