Changeset 944372e for src/webapp/webservice/inc/GnuBoat/ServiceShutdown.php
- Timestamp:
- Sep 21, 2017, 1:59:48 PM (9 years ago)
- Branches:
- debian/bullseye, debian/jessie
- Children:
- 6b3dd00
- Parents:
- 949f66d (diff), 3145648 (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. - File:
-
- 1 edited
Legend:
- Unmodified
- Added
- Removed
-
src/webapp/webservice/inc/GnuBoat/ServiceShutdown.php
r949f66d r944372e 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.
