26 $this->
output(
"checking setup");
30 if (file_exists(
'/data/scan/paperyardDirectoryNotMounted.txt'))
32 $warning[]=
"scan folder not properly mounted. Please specify /data/scan in docker run command.\n";
34 if (file_exists(
'/data/inbox/paperyardDirectoryNotMounted.txt'))
36 $warning[]=
"inbox folder not properly mounted. Please specify /data/inbox in docker run command.\n";
38 if (file_exists(
'/data/outbox/paperyardDirectoryNotMounted.txt'))
40 $warning[]=
"outbox folder not properly mounted. Please specify /data/outbox in docker run command.\n";
42 if (file_exists(
'/data/sort/paperyardDirectoryNotMounted.txt'))
44 $warning[]=
"sort folder not properly mounted. Please specify /sort/outbox in docker run command.\n";
46 if (file_exists(
'/data/database/paperyardDirectoryNotMounted.txt'))
48 $warning[]=
"database folder not properly mounted. Please specify /data/database in docker run command.\n";
50 $this->warning = $warning;
51 $warningMessage = join($warning,
"");
53 echo
"docker run not properly set:" . $warningMessage;
59 if (
"cli" == php_sapi_name())
61 $this->
output(
"Program call from CLI detected.");
62 if ($this->db->getConfigValue(
'enableCron')==0) {
63 $this->
output(
"please enable cron in config");
67 $this->
output(
"Program call from Webserver detected.");
81 $logProgram = basename($_SERVER[
'SCRIPT_NAME']);
82 echo
"$logProgram: $string\n";
84 $this->db->exec(
"INSERT INTO logShell (logProgram, logContent) VALUES ('$logProgram','$string');");
__construct($db)
constructor
output($string, $debug=0)
outputs string