source: trunk/DataCheck/Sourcefile.sh@ 19316

Last change on this file since 19316 was 19209, checked in by Daniela Dorner, 6 years ago
fixed bug in setstatus, changed order of processing
  • Property svn:executable set to *
File size: 21.6 KB
Line 
1#!/bin/bash
2
3# to treat aliases in bash-script correctly
4shopt -s expand_aliases
5
6# check if script has been started with absolute path
7if ! dirname $0 | grep -E '^/' >/dev/null 2>&1
8then
9 echo "Please start your script with an absolute path."
10 exit
11fi
12
13if [ "$AUTOMATIONSETUP" = "" ]
14then
15 echo "Please set the environment variable \$AUTOMATIONSETUP."
16 exit
17fi
18
19if [ "$SOURCEFILEPATH" = "" ]
20then
21 export SOURCEFILEPATH=`dirname $0`
22fi
23if [ "$SCRIPTNAME" = "" ]
24then
25 SCRIPTNAME=`basename $0`
26fi
27
28source $SOURCEFILEPATH/../Setup/setup.$AUTOMATIONSETUP
29
30if [ "$mars" = "" ]
31then
32 echo "Please set the path for MARS."
33 exit
34fi
35
36datetime=`date +%F-%H-%M-%S`
37
38if [ "$transferdelay" = "" ]
39then
40 # setup where immediate report of problem is needed, i.e. mainly LP
41 checknight=`date +%Y%m%d --date="-19HOUR"`
42else
43 # any setup where transfer might cause a delay in arrival of files
44 checknight=`date +%Y%m%d --date="-${transferdelay}day"`
45fi
46
47# function to make sure that a directory is made
48function makedir()
49{
50 if [ ! -d $@ ]
51 then
52 if [ "$processlog" = "" ] || [ "$logfile" = "" ]
53 then
54 mkdir -p $@
55 else
56 mkdir -pv $@
57 fi
58 if [ ! -d $@ ]
59 then
60 if ! [ "$processlog" = "" ]
61 then
62 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] ERROR could not make dir "$@ >> $processlog
63 else
64 echo "could not make dir "$@
65 fi
66 if ls $lockfile >/dev/null 2>&1
67 then
68 rm -v $lockfile
69 fi
70 exit
71 fi
72 fi
73}
74
75# logging paths for runlogs and processlog
76runlogpath=$logpath/run/`date +%Y/%m/%d`
77processlogpath=$logpath/processlog
78makedir $runlogpath
79makedir $processlogpath
80processlog=$processlogpath/process`date +%F`.log
81
82makedir $lockpath
83
84
85# function to provide proper logging in a single logfile ($processlog)
86function printprocesslog
87{
88 makedir $processlogpath
89 echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "$@ >> $processlog
90}
91
92# function to exit a script properly
93function finish()
94{
95 if ! [ "$lockfile" = "" ] && ls $lockfile >/dev/null 2>&1
96 then
97 printprocesslog "DEBUG " `rm -v $lockfile`
98 fi
99 printprocesslog "DEBUG finished "$SOURCEFILEPATH"/"$SCRIPTNAME
100 # fixme: handle different cases - sometimes exit of script is needed, sometimes only continue
101 exit
102}
103
104
105# set checkvalue to ok at the beginning of the scripts
106check="ok"
107
108# setup for jobmanager:
109# log files (can't be defined in script itself, as script can run longer
110# than one day
111jmerrorlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`-error.log
112jmscriptlog=$runlogpath/jobmanager-`whoami`-$HOSTNAME-$AUTOMATIONSETUP-`date +%F`.log
113
114# check if rc-files are available
115if ! ls $steps >/dev/null
116then
117 echo "Can't find steps.rc ($steps)"
118 finish
119fi
120if ! ls $sqlrc >/dev/null 2>&1 || [ "$sqlrc" = "" ]
121then
122 echo "Can't find sql.rc ($sqlrc)"
123 finish
124fi
125
126# resetting values for jobmanager
127pno=0
128totalpno=0
129running=0
130queued=0
131runningscript=0
132queuedscript=0
133stillinqueue=0
134
135
136# alias (we cannot check the beginning of the line due to
137# color codes in filldotraw.C)
138alias 'intgrep'='grep -E -o \\\("(int|Bool_t)"\\\)[0-9]+$ | grep -E -o [0-9]+'
139
140
141# in the following the functions, which are needed by several scripts, are
142# defined
143
144# function to check if a process is already locked
145# command line option can be used to execute something, e.g. 'continue'
146function checklock()
147{
148 if ! echo `date +%F\ %T`" "`whoami`"@"$HOSTNAME" "$SCRIPTNAME"["$$"] "`uname -a` > $lockfile 2>/dev/null
149 then
150 if find $lockfile -amin -5
151 then
152 printprocesslog "INFO lockfile $lockfile exists"
153 else
154 printprocesslog "WARN lockfile $lockfile exists"
155 fi
156 $@
157 exit
158 else
159 printprocesslog "DEBUG created lockfile $lockfile"
160 fi
161}
162
163# print the current status values
164function printstatusvalues()
165{
166 echo "the current values are:"
167 echo " starttime=$starttime"
168 echo " stoptime=$stoptime"
169 echo " availtime=$availtime"
170 echo " returncode=$returncode"
171 echo "-- check: -$check-"
172 echo ""
173}
174
175# function to send a mysql query
176function sendquery()
177{
178 #getdbsetup
179 printprocesslog "DEBUG sendquery QUERY: "$query
180 val=`mysql --defaults-file=$sqlrc -s -e " $query " 2>&1`
181 checkmysql=`echo $?`
182 if [ $checkmysql -gt 0 ]
183 then
184 printprocesslog "ERROR could not query DB (program: $program, function sendquery, mysqlsetup $sqlrc) "
185 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val
186 error=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
187 # here possible reaction to mysql error
188 if [ $error -eq 1213 ] || [ $error -eq 1205 ]
189 then
190 #printprocesslog "WARN Deadlock found. Should resend query."
191 printprocesslog "DEBUG sendquery QUERY: [2nd try] "$query
192 val=`mysql --defaults-file=$sqlrc -s -e " $query " 2>&1`
193 checkmysql2=`echo $?`
194 if [ $checkmysql2 -gt 0 ]
195 then
196 printprocesslog "ERROR could not query DB (program: $program, function sendquery, mysqlsetup $sqlrc) [2nd try]"
197 printprocesslog "MYSQLERROR [returncode: "$checkmysql"] "$val" [2nd try]"
198 error2=`echo $val | grep -E -o 'ERROR [1-9]{1,4}' | grep -E -o '[1-9]{1,4}'`
199 val=
200 finish
201 else
202 if [ "$val" = "NULL" ]
203 then
204 val=
205 fi
206 echo $val
207 return 0
208 fi
209 fi
210 val=
211 finish
212 else
213 warning=`echo $val | grep -o -E 'mysql: \[Warning\]'`
214 if [ "$warning" != "" ]
215 then
216 printprocesslog "WARN possible problem to query DB (program: $program, function sendquery, mysqlsetup $sqlrc) "
217 printprocesslog "MYSQLWARN [returncode: "$checkmysql"] "$val
218 val=
219 finish
220 fi
221 fi
222 if [ "$val" = "NULL" ]
223 then
224 val=
225 fi
226 echo $val
227 return 0
228}
229
230# function to get information from the setupfile $steps
231function getfromsetup()
232{
233 grep $1"[.]"$2":" $steps | grep -v '#' | sed -e "s/$1[.]$2://"
234}
235
236# function to get the needed information from the dependencies-file steps.rc
237function getstepinfo()
238{
239 #getdbsetup
240 needs=( `getfromsetup $step "Needs"` )
241 noderestricted=`getfromsetup $step "NodeRestricted"`
242 prims=( `getfromsetup $step "Primaries"` )
243 maintable=`getfromsetup $step "MainTable" | sed -e "s/\ //g"`
244 sort=`getfromsetup $step "SortDirection" | sed -e "s/\ //g"`
245# echo " maintable: "$maintable
246# echo " needs: "${needs[@]}
247# echo " noderestricted: "$noderestricted
248# echo " prims: "${prims[@]}
249}
250
251# function to get the joins needed for the get/set status queries
252function getalljoins()
253{
254 # add table
255 query=$query" "$maintable"Status"
256 # add special join
257 query=$query" "`getfromsetup $maintable "SpecialJoin"`
258 # add join for step unless step is the same as maintable
259 if ! [ "$step" = "$maintable" ]
260 then
261 query=$query" LEFT JOIN "$step"Status USING("${prims[@]}") "
262 fi
263 # add joins for influences or needs
264 for otherstep in ${othersteps[@]}
265 do
266 #printprocesslog "DEBUG "$otherstep
267 if ! [ "$otherstep" = "$maintable" ]
268 then
269 # joins for needed steps
270 if [ "$1" = "get" ]
271 then
272 query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
273 fi
274 # joins for influenced steps
275 if [ "$1" = "set" ]
276 then
277 query=$query" "`getfromsetup $otherstep "SpecialJoin2"`
278 query=$query" LEFT JOIN "$otherstep"Status USING("`getfromsetup $otherstep "Primaries"`") "
279 fi
280 fi
281 done
282}
283
284# function to create the middle part of a query
285# which is identical for the functions getstatus() and gettodo()
286function getstatusquery()
287{
288 # add from which table the information is queried
289 query=$query" FROM "
290 othersteps=${needs[@]}
291 getalljoins "get"
292 # add condition
293 query=$query" WHERE "
294 # add condition for step, i.e. step is not yet done
295 query=$query" ISNULL("$step"Status.fStartTime) "
296 query=$query" AND ISNULL("$step"Status.fStopTime) "
297 query=$query" AND ISNULL("$step"Status.fAvailable) "
298 query=$query" AND ISNULL("$step"Status.fReturnCode) "
299 # add requirement for production host in case it is needed
300 if [ "$1 " != " " ]
301 then
302 query=$query" AND fProductionHostKEY=$2 "
303 fi
304 query=$query`getfromsetup $step "SpecialWhere"`
305 # add condition for needs, i.e. that step is done
306 for (( k=0 ; k < ${#needs[@]} ; k++ ))
307 do
308# if [ $k -eq 0 ]
309# then
310# query=$query" HAVING "
311# else
312 query=$query" AND "
313# fi
314# query=$query" COUNT(*)=COUNT(IF("
315 query=$query" NOT ISNULL("${needs[$k]}"Status.fStartTime) "
316 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fStopTime) "
317 query=$query" AND NOT ISNULL("${needs[$k]}"Status.fAvailable) "
318 query=$query" AND ISNULL("${needs[$k]}"Status.fReturnCode) "
319# query=$query" , 1, NULL)) "
320 done
321# if ! echo $query | grep UPDATE >/dev/null 2>&1
322# then
323# query=$query" GROUP BY "${prims[@]}
324# fi
325}
326
327# function to get todolist
328# returns the next or the list of next steps
329function gettodo()
330{
331 # reset the variable for the number of the next step
332 process=
333 printprocesslog "DEBUG getting todo for step $step..."
334 getstepinfo
335 # get query
336 query=" SELECT "${prims[@]}
337 getstatusquery $2
338 # order by priority to the the number of the next step to be done
339 query=$query" ORDER BY "$step"Status.fPriority "
340 if [ "$sort" = "" ]
341 then
342 query=$query" ASC "
343 else
344 query=$query" "$sort
345 fi
346 # add limitation in case only one or a limited number of
347 # processes should be executed
348 if [ "$1 " != " " ]
349 then
350 query=$query" limit 0, $1 "
351 fi
352 # print query
353 #printprocesslog "DEBUG gettodo for step $step QUERY: "$query
354 # execute query
355 process=`sendquery`
356 #if ! process=`mysql -s -u $us --password=$pw --host=$ho $db -e " $query "`
357 #then
358 # printprocesslog "ERROR could not query processes from db (program: $program, function gettodo)"
359 # finish
360 #fi
361 # get numbers of next step from mysql result
362 if [ "$process" = "" ]
363 then
364 printprocesslog "DEBUG => nothing to do"
365 finish
366 else
367 primaries=( $process )
368 num=`expr ${#primaries[@]} / ${#prims[@]} `
369 fi
370}
371
372# function to get the number of processes which still have to be done
373function getstatus()
374{
375 printprocesslog "DEBUG getstatus for step "$step
376 # reset the variable for the number of steps to be done
377 numproc=0
378 getstepinfo
379 # get query
380 query=" SELECT "${prims[@]}
381 getstatusquery $1
382 # print query
383 #printprocesslog "DEBUG getstatus for step $step QUERY: "$query
384 # execute query
385 #numproc=`sendquery `#cannot be done with sendquery, because of row counting
386 printprocesslog "DEBUG send query "$query
387 printprocesslog "BLA "`which mysql`
388 if ! numproc=`mysql --defaults-file=$sqlrc -s -e " $query " | wc -l`
389 then
390 printprocesslog "ERROR could not query number of processes from db (program: $program, function getstatus, mysqlsetup $sqlrc)"
391 echo `date +%F\ %T`" ERROR could not query number of processes from db (program: $program, function getstatus, mysqlsetup $sqlrc)"
392 continue
393 fi
394}
395
396# function to set status of a process in the db
397function setstatus()
398{
399 # remark:
400 # this function does not include the 'Default' flag
401 # for resetting steps
402
403 # for dowebplots (there are steps which have no entry in the DB)
404 if [ "$step" = "no" ]
405 then
406 return
407 fi
408
409 printprocesslog "DEBUG setstatus for step "$step
410
411 # reset status values
412 starttime=NULL
413 stoptime=NULL
414 availtime=NULL
415 returncode=NULL
416 # evaluate the status values
417 case $@ in
418 start) printprocesslog "DEBUG setstatus start"
419 starttime="Now()"
420 ;;
421 startj) printprocesslog "DEBUG setstatus startj"
422 starttime="'1971-01-01 01:01:01'" # special recognizable datetime, i.e. "reserved by JobManager for processing"
423 ;;
424 stop) case $check in
425 ok) printprocesslog "DEBUG setstatus stop - ok"
426 starttime=noreset
427 stoptime="Now()"
428 if [ "$processingsite" = "$storagesite" ]
429 then
430 availtime="Now()"
431 fi
432 ;;
433 no) printprocesslog "DEBUG setstatus stop - nothing new"
434 check="ok"
435 ;;
436 *) printprocesslog "DEBUG setstatus stop - failed"
437 starttime=noreset
438 stoptime="Now()"
439 if [ "$processingsite" = "$storagesite" ]
440 then
441 availtime="Now()"
442 fi
443 if [ "$check" == "" ]
444 then
445 returncode=1
446 else
447 returncode=$check
448 fi
449 check="ok"
450 ;;
451 esac
452 ;;
453 *) printprocesslog "ERROR function setstatus got wrong variable"
454 finish
455 ;;
456 esac
457
458 # get
459 getstepinfo
460
461 # get the influences from the steps.rc by evaluating the needs of all steps
462 othersteps=`grep $step $steps | grep -v '#' | grep "Needs" | grep -v "$step[.]Needs" | cut -d'.' -f1`
463
464 # get query
465 query=" UPDATE "
466 getalljoins "set"
467 # set the status values according to the new status of the step
468 query=$query" SET "
469 if ! [ "$starttime" = "noreset" ]
470 then
471 query=$query" "$step"Status.fStartTime=$starttime, "
472 fi
473 query=$query" "$step"Status.fStopTime=$stoptime, "$step"Status.fAvailable=$availtime"
474 query=$query", "$step"Status.fReturnCode=$returncode , "$step"Status.fProcessingSiteKEY=$sitekey "
475 # set also the status values of the influenced steps
476 for otherstep in $othersteps
477 do
478 query=$query", "$otherstep"Status.fStartTime=IF("$otherstep"Status.fStartTime='1970-01-01 00:00:00', '1970-01-01 00:00:00', NULL) "
479 query=$query", "$otherstep"Status.fStopTime=IF("$otherstep"Status.fStartTime='1970-01-01 00:00:00', '1970-01-01 00:00:00', NULL) "
480 query=$query", "$otherstep"Status.fAvailable=NULL "
481 query=$query", "$otherstep"Status.fReturnCode=NULL "
482 query=$query", "$otherstep"Status.fProcessingSiteKEY=NULL "
483 done
484 # give the condition for which step the status values have to be set
485 query=$query" WHERE "
486 if [ "$s" = "" ]
487 then
488 s=0
489 fi
490 query=$query" "$step"Status."`echo ${prims[0]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}]}'"
491 for (( j=1 ; j < ${#prims[@]} ; j++ ))
492 do
493 query=$query" AND "$step"Status."`echo ${prims[$j]} | sed -e 's/,//g'`"='${primaries[$s*${#prims[@]}+$j]}' "
494 done
495 # add additional query to allow for locking in db
496 if [ "$1" = "start" ]
497 then
498 # process job only if it is not yet being processed
499 # i.e. either StartTime NULL or '1971-01-01 01:01:01' (reserved by JobManager for processing)
500 query=$query" AND (ISNULL("$step"Status.fStartTime) OR "$step"Status.fStartTime='1971-01-01 01:01:01')"
501 fi
502 # add row count to know how many rows have been changed
503 query=$query"; SELECT ROW_COUNT();"
504 # print query
505 #printprocesslog "DEBUG setstatus for step $step QUERY: "$query
506 #echo "DEBUG setstatus for step $step QUERY: "$query
507 # execute query
508 numchanged=`sendquery`
509 # should not be needed anymore once finish does proper exit
510 printprocesslog "DEBUG numchanged "$numchanged
511 if [ "$numchanged" = "" ]
512 then
513 printprocesslog "DEBUG numchanged empty."
514 finish
515 fi
516 if [ $numchanged -gt 0 ]
517 then
518 printprocesslog "INFO successful set of status in DB."
519 #echo "INFO successful set of status in DB."
520 else
521 # action may be taken in script using $numchanged
522 printprocesslog "DEBUG status in DB was already set by another process "
523 #echo "ERROR status in DB was already set by another process "
524 fi
525}
526
527function getdates()
528{
529 case $1 in
530 # all dates
531 all)
532 printprocesslog "DEBUG getdates case 'all'"
533 dates=( `find $auxdata -mindepth 3 -type d | sort -r | sed "s/\${auxdata_for_sed}//g" | sed -e 's/^\///'` )
534 ;;
535 # certain date
536 [0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]|[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]-[0-9][0-9][0-9])
537 d=`echo $1 | grep -o '[0-9][0-9][0-9][0-9]/[0-9][0-9]/[0-9][0-9]'`
538 range=`echo $1 | grep -o '[0-9][0-9][0-9]$'`
539 range=`echo $range | sed -e 's/^0//' -e 's/^0//'`
540 printprocesslog "DEBUG getdates - certain date "$d"."
541 dates=( $d )
542 if [ "$range" != "" ]
543 then
544 printprocesslog "DEBUG getdates - add the last "$range" days."
545 yy=`echo $d | cut -c 1-4`
546 mm=`echo $d | cut -c 6-7`
547 dd=`echo $d | cut -c 9-10`
548 for (( numdates=1 ; numdates <= $range ; numdates++ ))
549 do
550 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
551 dates=( ${dates[@]} `date +%Y/%m/%d --date=$yy/$mm/$dd"-"$numhours"hour"` )
552 done
553 fi
554 ;;
555 # certain number of dates (between 0 and 9999)
556 [1-9][0-9][0-9][0-9]|[1-9][0-9][0-9]|[1-9][0-9]|[1-9])
557 # get last n nights
558 printprocesslog "DEBUG getdates - get the last "$1" days."
559 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
560 do
561 numhours=`echo " 12 + ( $numdates - 1 ) * 24 " | bc -l`
562 dates=( ${dates[@]} `date +%Y/%m/%d --date="-"$numhours"hour"` )
563 done
564 # hour-dependent number of dates
565 if [ "$2" != "" ] && [ "$3" != "" ]
566 then
567 # get current hour
568 hour=`date +%k`
569 if [ $hour -le $2 ] || [ $hour -ge $3 ]
570 then
571 printprocesslog "DEBUG getdates - get the current night."
572 dates=( `date +%Y/%m/%d --date="-19hour"` )
573 fi
574 fi
575 ;;
576 # certain number of dates in the future (between 0 and 9)
577 +[1-9])
578 # get next n nights
579 printprocesslog "DEBUG getdates - get the next "$1" days (incl today)."
580 for (( numdates=1 ; numdates <= $1 ; numdates++ ))
581 do
582 numhours=`echo " 0 + ( $numdates - 1 ) * 24 " | bc -l`
583 dates=( ${dates[@]} `date +%Y/%m/%d --date="+"$numhours"hour"` )
584 done
585 # hour-dependent number of dates
586 if [ "$2" != "" ] && [ "$3" != "" ]
587 then
588 # get current hour
589 hour=`date +%k`
590 if [ $hour -le $2 ] || [ $hour -ge $3 ]
591 then
592 printprocesslog "DEBUG getdates - get the current night."
593 dates=( `date +%Y/%m/%d --date="-12hour"` )
594 fi
595 fi
596 ;;
597 *) # nothing valid given
598 echo "Please give valid option (YYYY/MM/DD[-RRR] or 1-9999 or +0-9)"
599 finish
600 ;;
601 esac
602}
603
604# missing: implement usage of this function in Fill*.sh
605function check_file_avail()
606{
607 if [ "$1" = "" ]
608 then
609 echo "Please give file name as first argument."
610 finish
611 fi
612
613 printprocesslog "INFO checking availability of "$1
614 if ! [ -e $1 ]
615 then
616 filenight=`basename $1 | cut -c 1-8`
617 # treat raw files differently than auxfiles
618 checkraw=`echo $1 | grep -E -o raw`
619 if [ "$checkraw" = "raw" ]
620 then
621 if [ $filenight -le $checknight ]
622 then
623 printprocesslog "WARN "$1" not found."
624 else
625 printprocesslog "INFO "$1" not found."
626 fi
627 return 1
628 fi
629 # only for aux files check of DB is needed
630 # treat ratescan files
631 checkratescan=`echo $1 | grep -E -o RATE_SCAN_DATA`
632 if [ "$checkratescan" = "RATE_SCAN_DATA" ] && [ $filenight -gt 20130408 ]
633 then
634 #query="SELECT fMeasurementTypeKey from MeasurementType WHERE fMeasurementTypeName like 'Ratescan%'"
635 #ratescantypes=`sendquery`
636 query="SELECT COUNT(*) FROM Schedule WHERE fStart BETWEEN "$scheduletart" AND "$schedulestop" AND fMeasurementTypeKey IN (5,8) "
637 numratescans=`sendquery`
638 if [ $numratescans -gt 0 ]
639 then
640 printprocesslog "ERROR "$1" not found."
641 else
642 printprocesslog "INFO "$1" not found."
643 fi
644 return 1
645 fi
646 query="SELECT COUNT(*) FROM RunInfo WHERE fNight="$filenight" AND fRunTypeKey=1"
647 numdatruns=`sendquery`
648 # for some files it is more severe when they are missing
649 checkfile=`echo $1 | grep -E -o 'DRIVE'\|'RATES'`
650 # print INFO/WARN/ERROR depending on severity
651 if [ $numdatruns -eq 0 ]
652 then
653 # in case no data runs are available from this night, it's not a problem if files are missing
654 printprocesslog "INFO "$1" not found."
655 else
656 if [ "$checkfile" != "" ]
657 then
658 # drive and trigger-rates files are needed for analysis
659 #printprocesslog "ERROR "$1" not found."
660 if [ $filenight -le $checknight ]
661 then
662 printprocesslog "ERROR "$1" not found."
663 else
664 printprocesslog "WARN "$1" not found. ("$filenight" - "$checknight")"
665 fi
666 else
667 # other aux-files would be good to have
668 #printprocesslog "WARN "$1" not found."
669 if [ $filenight -le $checknight ]
670 then
671 printprocesslog "WARN "$1" not found. ("$filenight" - "$checknight")"
672 else
673 printprocesslog "INFO "$1" not found."
674 fi
675 fi
676 fi
677 return 1
678 fi
679
680 # file available
681 return 0
682}
683
Note: See TracBrowser for help on using the repository browser.