- File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/inc/GnuBoat/ServiceShutdown.php
r563c04b r0662b2d 36 36 if($handle === false){ 37 37 $message = "Could not create file (". $config->shutdownRequestFile() .") to indicate shutdown to the daemon."; 38 error_log($message); 39 $result["shutdownstart"] = -1; 40 $result["errormessage"] = $message; 41 } 42 else{ 43 $shutdownTime = new \DateTime('NOW'); 44 $shutdownTime->modify("+15 seconds"); 45 fwrite($handle, $shutdownTime->format(\DateTime::ATOM)); 46 $result["shutdownstart"] = $shutdownTime->format(\DateTime::ATOM); 38 return $this->error($message, ["shutdownstart" => -1]); 47 39 } 48 40 49 header('Content-Type: application/json'); 50 if($debug > 0){ 51 echo json_encode($result, JSON_PRETTY_PRINT) ."\n"; 52 } 53 else{ 54 echo json_encode($result) ."\n"; 55 } 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); 56 47 } 57 48 }
Note:
See TracChangeset
for help on using the changeset viewer.
