Permalink
Browse files

Read DB_HOST and DB_PASS from system.conf in CGI scripts (Issue #6)

  • Loading branch information...
1 parent 2ab1774 commit 1f9fe904d2e0545cbcb74ff78a2a4e272cb83063 Khalid Ahmed committed Dec 20, 2012
Showing with 6 additions and 4 deletions.
  1. +3 −2 cgi-bin/updateappstatus.sh
  2. +3 −2 cgi-bin/updatevmstatus.sh
@@ -29,9 +29,10 @@ SERVICE_NAME=`echo "$QUERY_STRING" | grep -oE "(^|[?&])service=[^&]+" | sed "s/%
echo "Updating SERVICE = " $SERVICE_NAME "VMID = " $VMID "Envid = " $ENVID " STATUS = " $STATUS >> $LOGFILE
USER=root
-DB_HOST=127.0.0.1
-DB_PASS=
DB=opennebula
+ONE_LOCATION=/var/lib/one
+. $ONE_LOCATION/opennebula-carina/etc/system.conf
+
VMTABLE="vm_pool_ext"
APPENVTABLE="app_environment"
@@ -27,9 +27,10 @@ SERVICE_NAME=`echo "$QUERY_STRING" | grep -oE "(^|[?&])service=[^&]+" | sed "s/%
echo "Updating VMID = " $VMID "Envid = " $ENVID "NEWIP = " $NEW_IP "HOSTNAME=" $HOSTNAME >> $LOGFILE
USER=root
-DB_HOST=127.0.0.1
-DB_PASS=
DB=opennebula
+ONE_LOCATION=/var/lib/one
+. $ONE_LOCATION/opennebula-carina/etc/system.conf
+
VMTABLE="vm_pool_ext"
APPENVTABLE="app_environment"

0 comments on commit 1f9fe90

Please sign in to comment.