Changeset 9be4f3f


Ignore:
Timestamp:
Jul 21, 2016, 4:45:27 PM (10 years ago)
Author:
Joachim Langenbach <joachim.langenbach@…>
Branches:
0.5, app-cordova, debian/bullseye, debian/jessie, master
Children:
04de4a4, 95c02ff
Parents:
6c57d0a
Message:
  • Updated default paths for database files
  • Added config option to webservice to configure shutdown file
Location:
src
Files:
3 edited

Legend:

Unmodified
Added
Removed
  • src/daemon/gnuboat

    r6c57d0a r9be4f3f  
    4747
    4848# default values for command line arguments
    49 rrdfile = "/var/www/html/webservice/data/log-webservice.rrd"
     49rrdfile = "/usr/share/gnuboat/webservice/data/log-webservice.rrd"
    5050shutdownfile = "/var/spool/gnuboat/shutdown.request"
    5151logperiod = 1
  • src/webapp/webservice/inc/Config.php

    r6c57d0a r9be4f3f  
    3838        }
    3939       
     40        public function shutdownRequestFile(){
     41                if(array_key_exists("shutdownfile", $this->_config))
     42                        return $this->_config["shutdownfile"];
     43                return "/var/spool/gnuboat/shutdown.request";
     44        }
     45       
    4046        public function dataDirectory(){
    4147                if(array_key_exists("datadirectory", $this->_config))
  • src/webapp/webservice/index.php

    r6c57d0a r9be4f3f  
    133133$result = array();
    134134if($request == REQUEST_SHUTDOWN){
    135         $handle = @fopen("/var/spool/gnuboat/shutdown.request", "w");
     135        $handle = @fopen($config->shutdownRequestFile(), "w");
    136136        if($handle === false){
    137                 $message = "Could not create file to indicate shutdown to the daemon (Timezone: ". date_default_timezone_get() .")";
     137                $message = "Could not create file (". $config->shutdownRequestFile() .") to indicate shutdown to the daemon (Timezone: ". date_default_timezone_get() .")";
    138138                if($debug > 0)
    139139                        echo $message;
Note: See TracChangeset for help on using the changeset viewer.