File: 81_phpdbconfig.dpatch

package info (click to toggle)
bandwidthd 2.0.1%2Bcvs20090917-4.1
  • links: PTS
  • area: main
  • in suites: squeeze
  • size: 1,064 kB
  • ctags: 560
  • sloc: sh: 13,357; ansic: 2,743; php: 1,235; yacc: 216; makefile: 160; lex: 36; sql: 27
file content (27 lines) | stat: -rw-r--r-- 1,064 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
#! /bin/sh /usr/share/dpatch/dpatch-run
## 81_phpdbconfig.dpatch by Andreas Henriksson <andreas@fatal.se>
##
## All lines beginning with `## DP:' are a description of the patch.
## DP: Modify php configuration to fetch postgresql auth params from
## DP: dbconfig-common generated file.

@DPATCH@
diff -urNad bandwidthd-2.0.1+cvs20071208~/phphtdocs/config.conf bandwidthd-2.0.1+cvs20071208/phphtdocs/config.conf
--- bandwidthd-2.0.1+cvs20071208~/phphtdocs/config.conf	2007-09-04 22:14:25.000000000 +0200
+++ bandwidthd-2.0.1+cvs20071208/phphtdocs/config.conf	2007-12-08 21:55:48.000000000 +0100
@@ -1,4 +1,4 @@
-<?
+<?php
 define("DFLT_WIDTH", 1100);
 define("DFLT_HEIGHT", 325);
 define("DFLT_INTERVAL", INT_DAILY);
@@ -7,5 +7,6 @@
 define("ZOOM_LAT", "40.72982797782921");
 define("ZOOM_LEVEL", "8");
 
-$db_connect_string = "host = 216.24.112.16 user = swarm dbname = swarm"
-?>
\ No newline at end of file
+include("/etc/bandwidthd/debian-db.php");
+$db_connect_string = "host='$dbserver' port='$dbport' dbname='$dbname' user='$dbuser' password='$dbpass'";
+?>