Added new table to the database : log_adv_daemon, database version = 24
authorarjen <arjen>
Sat, 8 Feb 2003 07:38:44 +0000 (07:38 +0000)
committerarjen <arjen>
Sat, 8 Feb 2003 07:38:44 +0000 (07:38 +0000)
Made gcm_daemon a 'proper' executable.
Paths of included files are more flexible.

src/gcm_daemon/gcm_daemon.php

index 2cc1da2..bc0547a 100755 (executable)
@@ -1,3 +1,4 @@
+#!/usr/bin/php
 <?PHP
 /**********************************************************************************
 **  (c) Copyright 2002, Brenno J.S.A.A.F. de Winter, De Winter Information Solutions
 
 */
 
+// $Id: gcm_daemon.php,v 1.5 2003-02-08 07:38:44 arjen Exp $
+
+ini_set('include_path', '.:./classes:../phpclasses');
+
 //Tell the log that we're up.
 define_syslog_variables();
 openlog("gnucomo", LOG_PID, LOG_DAEMON);
 syslog(LOG_INFO, "gcm_daemon started");
 
-require_once "classes/gnucomo_config.class.php";
-require_once "classes/db.class.php";
-require_once "classes/gnucomo.process_log.php";
+require_once "gnucomo_config.php";
+require_once "db.class.php";
+require_once "gnucomo.process_log.php";
 
 // Set the standard variables //
 $project_name  = "gnucomo";    //name of the entire project
 $app_name      = "gcm_daemon"; //name of the application running
-$developrelease = "FALSE";      //Indicates if special debug settings are needed
-$db_version    = 22;           //The db_version indicates what the level of 
+$developrelease = "TRUE";      //Indicates if special debug settings are needed
+$db_version    = 24;           //The db_version indicates what the level of 
                                //the database should be. If the database is 
                                //old an update will be generated.
 $gcmd_version   = 3;           //This value indicates the active version of the gcm_daemon,
@@ -79,7 +84,7 @@ if ($dbms->fetch_row() == "TRUE") {
  
   //Update the database to the most recent version.
   if ($active_version < $db_version) { 
-     include ("classes/gnucomo_db_version.php");
+     include ("gnucomo_db_version.php");
   }
 } else {
   syslog (LOG_INFO, "Couldn't initialize database version. Is this a gnucomo database?");
@@ -226,11 +231,6 @@ function process_log () {
    } else {
      die ("done");
    }
-/*
-   //close the transaction
-   $local_working = "COMMIT";
-   $dbms_working->query($local_working);
-*/
 }
 
 ?>