Browse Source

„APP/ui/synOCR-start.sh“ ändern

1.2.x_release
Stephan Geisler 4 months ago
parent
commit
59fc5433c3
  1. 24
      APP/ui/synOCR-start.sh

24
APP/ui/synOCR-start.sh

@ -97,6 +97,18 @@
fi
fi
# check for update:
if [[ $(sqlite3 ./etc/synOCR.sqlite "SELECT value_1 FROM system WHERE key='checkmon'") -ne $(date +%m) ]]; then
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(date +%m)' WHERE key='checkmon'"
if [[ $(sqlite3 ./etc/synOCR.sqlite "SELECT value_1 FROM system WHERE key='checkmon'") -eq $(date +%m) ]]; then
server_info=$(wget --no-check-certificate --timeout=60 --tries=1 -q -O - "https://geimist.eu/synOCR/updateserver.php?file=VERSION_DSM${dsm_version}&version=$(get_key_value /var/packages/synOCR/INFO version)&arch=$machinetyp" )
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(echo "$server_info" | sed -n "2p")' WHERE key='online_version'"
if [[ $(echo "$server_info" | sed -n "1p" ) != "ok" ]]; then
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(date -d "-1 month" +%m)' WHERE key='checkmon'"
fi
fi
fi
# load configuration:
sSQL="SELECT profile_ID, INPUTDIR, OUTPUTDIR, LOGDIR, SearchPraefix, loglevel, profile FROM config WHERE active='1' "
sqlerg=$(sqlite3 -separator $'\t' ./etc/synOCR.sqlite "$sSQL")
@ -162,18 +174,6 @@
continue
fi
# check for update:
if [[ $(sqlite3 ./etc/synOCR.sqlite "SELECT value_1 FROM system WHERE key='checkmon'") -ne $(date +%m) ]]; then
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(date +%m)' WHERE key='checkmon'"
if [[ $(sqlite3 ./etc/synOCR.sqlite "SELECT value_1 FROM system WHERE key='checkmon'") -eq $(date +%m) ]]; then
server_info=$(wget --no-check-certificate --timeout=60 --tries=1 -q -O - "https://geimist.eu/synOCR/updateserver.php?file=VERSION_DSM${dsm_version}&version=$(get_key_value /var/packages/synOCR/INFO version)&arch=$machinetyp" )
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(echo "$server_info" | sed -n "2p")' WHERE key='online_version'"
if [[ $(echo "$server_info" | sed -n "1p" ) != "ok" ]]; then
sqlite3 "./etc/synOCR.sqlite" "UPDATE system SET value_1='$(date -d "-1 month" +%m)' WHERE key='checkmon'"
fi
fi
fi
# only start (create LOG) if there is something to do:
exclusion=false
count_inputpdf=0

Loading…
Cancel
Save