Ignore:
Timestamp:
Dec 10, 2017, 4:32:57 PM (9 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
debian/bullseye, debian/jessie
Children:
ce5244e
Parents:
c810990 (diff), 8ef59a1 (diff)
Note: this is a merge changeset, the changes displayed below correspond to the merge itself.
Use the (diff) links above to see all the changes relative to each parent.
Message:

Merge branch 'debian/jessie' of ​https://svn.engsas.de/gnuboat into debian/jessie

File:
1 edited

Legend:

Unmodified
Added
Removed
  • src/webapp/webservice/inc/GnuBoat/ServiceShutdown.php

    rc810990 r8fd7454  
    3636                if($handle === false){
    3737                        $message = "Could not create file (". $config->shutdownRequestFile() .") to indicate shutdown to the daemon.";
    38                         if($debug > 0)
    39                                 echo $message;
    40                         error_log($message);
    41                         $result["shutdownstart"] = -1;
    42                         $result["errormessage"] = $message;
    43                 }
    44                 else{
    45                         $shutdownTime = new \DateTime('NOW');
    46                         $shutdownTime->modify("+15 seconds");
    47                         fwrite($handle, $shutdownTime->format(\DateTime::ATOM));
    48                         $result["shutdownstart"] = $shutdownTime->format(\DateTime::ATOM);
     38                        return $this->error($message, ["shutdownstart" => -1]);
    4939                }
    5040
    51                 header('Content-Type: application/json');
    52                 if($debug > 0){
    53                         echo json_encode($result,  JSON_PRETTY_PRINT) ."\n";
    54                 }
    55                 else{
    56                         echo json_encode($result) ."\n";
    57                 }
     41                $shutdownTime = new \DateTime('NOW');
     42                $shutdownTime->modify("+15 seconds");
     43                fwrite($handle, $shutdownTime->format(\DateTime::ATOM));
     44                fclose($handle);
     45                $result["shutdownstart"] = $shutdownTime->format(\DateTime::ATOM);
     46                $this->output($result);
    5847        }
    5948}
Note: See TracChangeset for help on using the changeset viewer.