wok-6.x rev 1920
Asterisk: add setup-rules for postgresql
author | Pascal Bellard <pascal.bellard@slitaz.org> |
---|---|
date | Mon Dec 22 12:16:29 2008 +0000 (2008-12-22) |
parents | d5ab723d6bb4 |
children | 1ec955a912be |
files | asterisk/receipt |
line diff
1.1 --- a/asterisk/receipt Mon Dec 22 10:07:58 2008 +0000 1.2 +++ b/asterisk/receipt Mon Dec 22 12:16:29 2008 +0000 1.3 @@ -43,25 +43,45 @@ 1.4 case "$2" in 1.5 mysql_host) 1.6 sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_mysql.conf 1.7 - sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysqlconf 1.8 + sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_mysql.conf 1.9 ;; 1.10 mysql_user) 1.11 sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_mysql.conf 1.12 - sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysqlconf 1.13 + sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_mysql.conf 1.14 ;; 1.15 mysql_password) 1.16 sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_mysql.conf 1.17 - sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysqlconf 1.18 + sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_mysql.conf 1.19 ;; 1.20 mysql_database) 1.21 - sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysqlconf \ 1.22 + sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_mysql.conf \ 1.23 $1/etc/asterisk/cdr_mysql.conf 1.24 ;; 1.25 + pgsql_host) 1.26 + sed -i "s|^hostname=.*|hostname=$3|" $1/etc/asterisk/cdr_pgsql.conf 1.27 + sed -i "s|^dbhost=.*|dbhost=$3|" $1/etc/asterisk/res_pgsql.conf 1.28 + ;; 1.29 + pgsql_user) 1.30 + sed -i "s|^user=.*|user=$3|" $1/etc/asterisk/cdr_pgsql.conf 1.31 + sed -i "s|^dbuser=.*|dbuser=$3|" $1/etc/asterisk/res_pgsql.conf 1.32 + ;; 1.33 + pgsql_password) 1.34 + sed -i "s|^password=.*|password=$3|" $1/etc/asterisk/cdr_pgsql.conf 1.35 + sed -i "s|^dbpass=.*|dbpass=$3|" $1/etc/asterisk/res_pgsql.conf 1.36 + ;; 1.37 + pgsql_database) 1.38 + sed -i "s|^dbname=.*|dbname=$3|" $1/etc/asterisk/res_pgsql.conf \ 1.39 + $1/etc/asterisk/cdr_pgsql.conf 1.40 + ;; 1.41 *) cat <<EOT 1.42 mysql_host hostname or ip of mysql server 1.43 mysql_user username to connect to mysql server 1.44 mysql_password password to connect to mysql server 1.45 mysql_database database used by asterisk 1.46 +pgsql_host hostname or ip of postgresql server 1.47 +pgsql_user username to connect to postgresql server 1.48 +pgsql_password password to connect to postgresql server 1.49 +pgsql_database database used by asterisk 1.50 EOT 1.51 ;; 1.52 esac