X-Git-Url: http://wagnertech.de/gitweb/gitweb.cgi/kivitendo-erp.git/blobdiff_plain/c6dd542b51ae9549ad42a54f9023b905412bbab9..d59576d22d6c7720c0078b3e17232c81bbaf9373:/scripts/task_server.pl diff --git a/scripts/task_server.pl b/scripts/task_server.pl index 1bcb719c9..c946371d0 100755 --- a/scripts/task_server.pl +++ b/scripts/task_server.pl @@ -32,6 +32,7 @@ use File::Spec; use List::Util qw(first); use POSIX qw(setuid setgid); use SL::Auth; +use SL::DBUpgrade2; use SL::DB::AuthClient; use SL::DB::BackgroundJob; use SL::BackgroundJob::ALL; @@ -110,6 +111,8 @@ sub clean_before_sleeping { Form::disconnect_standard_dbh; SL::DBConnect::Cache->disconnect_all_and_clear; SL::DB->db_cache->clear; + + File::Temp::cleanup(); } sub drop_privileges { @@ -210,6 +213,18 @@ 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 <show_backtrace(); - die <