X-Git-Url: http://wagnertech.de/git?a=blobdiff_plain;f=scripts%2Ftask_server.pl;h=2fd93de0f88dc6d689cc9e07fb8554d39be36611;hb=02b714e791e082d96a723649747103f05c256a25;hp=1bcb719c9b4f36b85c3296dae790a96a0372824a;hpb=c6dd542b51ae9549ad42a54f9023b905412bbab9;p=kivitendo-erp.git diff --git a/scripts/task_server.pl b/scripts/task_server.pl index 1bcb719c9..2fd93de0f 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 <