- die "Missing section [task_server] in config file" unless $lx_office_conf{task_server};
- die "Missing key 'login' in section [task_server] in config file" unless $lx_office_conf{task_server}->{login};
- die "Missing key 'client' in section [task_server] in config file" unless $lx_office_conf{task_server}->{client};
+ die "Missing section [task_server] in config file" unless $lx_office_conf{task_server};
+
+ if ($lx_office_conf{task_server}->{login} || $lx_office_conf{task_server}->{client}) {
+ print STDERR <<EOT;
+ERROR: The keys 'login' and/or 'client' are still present in the
+section [task_server] in the configuration file. These keys are
+deprecated. You have to configure the clients for which to run the
+task server in the web admin interface.
+
+The task server will refuse to start until the keys have been removed from
+the configuration file.
+EOT
+ exit 2;
+ }
+
+ initialize_kivitendo();
+
+ my $dbupdater_auth = SL::DBUpgrade2->new(form => $::form, auth => 1)->parse_dbupdate_controls;
+ if ($dbupdater_auth->unapplied_upgrade_scripts($::auth->dbconnect)) {
+ print STDERR <<EOT;
+The authentication database requires an upgrade. Please login to
+kivitendo's administration interface in order to apply it. The task
+server cannot start until the upgrade has been applied.
+EOT
+ exit 2;
+ }