Commit cce365e8 authored by Dmitriy Safronov's avatar Dmitriy Safronov
Browse files

multistage scan

parent f4eb471e
Loading
Loading
Loading
Loading
Loading
+14 −1
Original line number Diff line number Diff line
@@ -33,14 +33,27 @@ daemon () {
        -g sopds \
        sh -c \
        "${CONTROL} migrate && \
        # Essential
        ${CONTROL} sopds_util setconf SOPDS_ROOT_LIB '/books' && \
        ${CONTROL} sopds_util setconf SOPDS_ZIPSCAN True && \
        ${CONTROL} sopds_util setconf SOPDS_ZIPCODEPAGE 'utf-8' && \
        ${CONTROL} sopds_util setconf SOPDS_DELETE_LOGICAL True && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_ENABLE True && \
        # First (fast) scan on start
        ${CONTROL} sopds_util setconf SOPDS_INPX_SKIP_UNCHANGED False && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_ZIP False && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_FILES False && \
        ${CONTROL} sopds_scanner scan --verbose
        # Second (slow) scan on start
        ${CONTROL} sopds_util setconf SOPDS_INPX_SKIP_UNCHANGED False && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_ZIP True && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_FILES True && \
        ${CONTROL} sopds_util setconf SOPDS_DELETE_LOGICAL True && \
        ${CONTROL} sopds_scanner scan --verbose
        # Scheduled scan
        ${CONTROL} sopds_util setconf SOPDS_SCAN_START_DIRECTLY True && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_SKIP_UNCHANGED True && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_ZIP True && \
        ${CONTROL} sopds_util setconf SOPDS_INPX_TEST_FILES True && \
        exec ${CONTROL} sopds_scanner start --verbose $@"
}