[Pkg-voip-commits] r3222 - in freepbx/trunk/debian: . mysql sqlite3
Diego Iastrubni
elcuco-guest at alioth.debian.org
Sun Mar 11 11:15:28 CET 2007
Author: elcuco-guest
Date: 2007-03-11 10:15:28 +0000 (Sun, 11 Mar 2007)
New Revision: 3222
Added:
freepbx/trunk/debian/freepbx-common.postrm
freepbx/trunk/debian/mysql/install-sql
freepbx/trunk/debian/mysql/remove-sql
freepbx/trunk/debian/share/
freepbx/trunk/debian/sqlite3/install-sql
freepbx/trunk/debian/sqlite3/remove-sql
Removed:
freepbx/trunk/debian/freepbx-common.prerm
freepbx/trunk/debian/mysql/freepbx-install-mysql.sh
freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh
freepbx/trunk/debian/rapid/
freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh
freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh
Modified:
freepbx/trunk/debian/freepbx-common.install
freepbx/trunk/debian/freepbx-common.postinst
freepbx/trunk/debian/freepbx-mysql.install
freepbx/trunk/debian/freepbx-sqlite3.install
freepbx/trunk/debian/rules
Log:
cleanups:
* mysql,sqlite: remove/install scripts have proper names
* init.d cleanup. i hope its usable now
* rapid directory renamed to "share"
* postrm renamed to prerm, now package purges it's configuration
* when installing the package, generate random passwords for the sql server and manager
Modified: freepbx/trunk/debian/freepbx-common.install
===================================================================
--- freepbx/trunk/debian/freepbx-common.install 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/freepbx-common.install 2007-03-11 10:15:28 UTC (rev 3222)
@@ -4,21 +4,21 @@
amp_conf/htdocs/admin/*.php usr/share/freepbx/
amp_conf/htdocs/admin/i18n/* usr/share/freepbx/i18n/
amp_conf/htdocs/admin/common/*.css usr/share/freepbx/common/
-debian/rapid/mainstyle-alternative.css usr/share/freepbx/common/
+debian/share/mainstyle-alternative.css usr/share/freepbx/common/
amp_conf/htdocs/admin/common/*.php usr/share/freepbx/common/
amp_conf/htdocs/admin/modules/core usr/share/freepbx/modules/
amp_conf/htdocs/admin/images/*.png usr/share/freepbx/images/
amp_conf/htdocs/admin/images/*.gif usr/share/freepbx/images/
-debian/rapid/xorcom-rapid.png usr/share/freepbx/images/
-debian/rapid/xorcom.png usr/share/freepbx/images/
+debian/share/xorcom-rapid.png usr/share/freepbx/images/
+debian/share/xorcom.png usr/share/freepbx/images/
install_amp usr/share/freepbx-common/
-debian/rapid/amportal.conf usr/share/freepbx-common/
-debian/rapid/freepbx-post-reload usr/share/freepbx-common/
-debian/rapid/update-freepbx usr/sbin/
-debian/rapid/freepbx-enable-all-modules usr/share/freepbx-common/
-debian/rapid/post-reload/* usr/share/freepbx-common/post-reload/
+debian/share/amportal.conf usr/share/freepbx-common/
+debian/share/freepbx-post-reload usr/share/freepbx-common/
+debian/share/update-freepbx usr/sbin/
+debian/share/freepbx-enable-all-modules usr/share/freepbx-common/
+debian/share/post-reload/* usr/share/freepbx-common/post-reload/
SQL/*.sql usr/share/freepbx-common/sql/
upgrades/* usr/share/freepbx-common/upgrades/
Modified: freepbx/trunk/debian/freepbx-common.postinst
===================================================================
--- freepbx/trunk/debian/freepbx-common.postinst 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/freepbx-common.postinst 2007-03-11 10:15:28 UTC (rev 3222)
@@ -30,12 +30,66 @@
fi
}
+issue_install()
+{
+ # copy the default configuration file
+ cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf
+ # create random passwords for manager and sql
+ RAND_PASS=`dd if=/dev/urandom count=20 2>/dev/null | md5sum | awk '{print $1}'` &&
+ sed -r -i "s/AMPDBPASS=[a-zA-Z0-9]*/AMPDBPASS=$RAND_PASS/" /etc/amportal.conf
+ RAND_PASS=`dd if=/dev/urandom count=20 2>/dev/null | md5sum | awk '{print $1}'` &&
+ sed -r -i "s/AMPMGRPASS=[a-zA-Z0-9]*/AMPMGRPASS=$RAND_PASS/" /etc/amportal.conf
+
+ # don't trust anytyhing, as in the future we might ship the stock amportal.conf
+ # provided by upstream, instead of our own amportal.conf
+ sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
+ sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
+ /usr/share/freepbx-common/install-sql
+
+ # apply new configuration
+ update-freepbx
+
+ # if it works, enable the core module
+ # TODO: is this needed? the default install does not enable the core module?
+ /usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
+}
+
+issue_upgrade()
+{
+ # if you upgarde freepbx from amp you might get a wrong AMPWEBROOT.
+ # The webroot is part to this package then we fix it by force
+ # Same for asterisk bin directory
+ echo -n "Fixing /etc/amportal.conf"
+ sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
+ sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
+ echo "."
+
+ # apply new configuration
+ update-freepbx
+
+ # do the updates needed
+ if ! /usr/share/freepbx-common/install_amp --no-files ; then
+ # this may fail for so many reasons... let the user do it himself
+ # after the package has been installed
+ # TODO: use debconf. Debian policy says echo is bad
+ echo \
+"Upgrade failed, continuing anyway. Fix your system and execute:
+ /usr/share/freepbx-common/install_amp --no-files
+
+You may want also to enable the code module using this command
+(this can be done from the GUI as well):
+ /usr/share/asterisk/bin/module_admin install core
+"
+ fi
+}
+
case "$1" in
configure)
# we check only php4, as php5 on etch has other (smarter) tricks
# on php4+etch, if this trick is enabled, do not check for this
# at all.
+ # TODO: is this still valid in Etch? I had to do it in Sarge
if [ ! -f /etc/php4/conf.d/mysql.ini ]; then
check_file "/etc/php4/cgi/php.ini"
check_file "/etc/php4/cli/php.ini"
@@ -49,50 +103,28 @@
# fix log permissions, if not available - create them
touch /var/log/asterisk/
- for i in retrieve opbounce; do j=/var/log/asterisk/freepbx-$i.log; touch $j; chown asterisk:asterisk $j; chmod g+rw $j; done
+ for i in retrieve opbounce; do
+ j=/var/log/asterisk/freepbx-$i.log
+ touch $j
+ chown asterisk:asterisk $j
+ chmod g+rw $j
+ done
# is this an upgrade? or clean install?
if [ -e /etc/amportal.conf ]; then
- # if you upgarde freepbx from amp you might get a wrong AMPWEBROOT.
- # The webroot is part to this package then we fix it by force
- # Same for asterisk bin directory
- echo -n "Fixing /etc/amportal.conf"
- sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
- sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
- echo "."
-
- # do the updates needed
- if ! /usr/share/freepbx-common/install_amp --no-files ; then
- # this may fail for so many reasons... let the user do it itself
- # after the package has been installed
- echo \
-"Upgrade failed, continuing anyway. Fix your system and execute:
- /usr/share/freepbx-common/install_amp --no-files
-
-You may want also to enable the code module using this command
-(this can be done from the GUI as well):
- /usr/share/asterisk/bin/module_admin install core
-"
- fi
+ issue_upgrade
else
- # NEW INSTALL
- cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf
+ issue_install
+ fi
- sed -r -i "s|AMPWEBROOT=[a-zA-Z0-9/]*|AMPWEBROOT=/usr/share/freepbx|" /etc/amportal.conf
- sed -r -i "s|AMPBIN=[a-zA-Z0-9/]*|AMPBIN=/usr/share/asterisk/bin|" /etc/amportal.conf
- /usr/share/freepbx-common/install-sql
- # if it works, enable the core module
- /usr/share/asterisk/bin/module_admin install core || echo "Continuing anyway"
- fi
+ # list of web-servers supported.
+ # TODO: fill this list using 'apt-cache show httpd-cgi'
+ WEBSERVERS="apache apache2 mathopd lighttpd"
- # apply new configuration
- update-freepbx
-
- # on fresh installs, we need to modify the www-data user
- # this might be already done by other packages, or a previous version
+ # on fresh installs, we need to modify the www-data user this
+ # might be already done by other packages, or a previous version
# of this package.
- # this is ok for the process to fail
if groups www-data | grep -q -w -v asterisk ; then
echo -n "Changing permissions of the web server"
adduser www-data asterisk
@@ -100,19 +132,17 @@
# TODO - there must be a generic way of doying this stuff
echo "Restarting the httpd server to take usage of the new ownership"
- for i in apache apache2 mathopd lighttpd; do
- if test -x /etc/init.d/$i; then
- invoke-rc.d $i restart
- fi
- done
+ HTTPD_ACTION=restart
else
- # on upgrages, reloading apache(s) is enough
- for i in apache apache2 mathopd ; do
- if test -x /etc/init.d/$i; then
- invoke-rc.d $i reload
- fi
- done
+ # on upgrades, reloading apache(s) is enough
+ HTTPD_ACTION=reload
fi
+
+ for i in $WEBSERVERS; do
+ if test -x /etc/init.d/$i; then
+ invoke-rc.d $i $HTTPD_ACTION
+ fi
+ done
;;
abort-upgrade|abort-remove|abort-deconfigure)
Copied: freepbx/trunk/debian/freepbx-common.postrm (from rev 3221, freepbx/trunk/debian/freepbx-common.prerm)
Deleted: freepbx/trunk/debian/freepbx-common.prerm
===================================================================
--- freepbx/trunk/debian/freepbx-common.prerm 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/freepbx-common.prerm 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,48 +0,0 @@
-#! /bin/sh
-# prerm script for ${package_name}
-#
-
-set -e
-
-# summary of how this script can be called:
-# * <postrm> `remove'
-# * <postrm> `purge'
-# * <old-postrm> `upgrade' <new-version>
-# * <new-postrm> `failed-upgrade' <old-version>
-# * <new-postrm> `abort-install'
-# * <new-postrm> `abort-install' <old-version>
-# * <new-postrm> `abort-upgrade' <old-version>
-# * <disappearer's-postrm> `disappear' <r>overwrit>r> <new-version>
-# for details, see http://www.debian.org/doc/debian-policy/ or
-# the debian-policy package
-
-# if [ "$DPKG_DEBUG" = "developer" ]; then
-# set -x
-# fi
-
-case "$1" in
- purge)
- # this may fall, no problems
- /usr/share/freepbx-common/remove-sql || true
-
- rm -f /etc/amportal.conf || true
- ;;
-
- remove)
- ;;
-
- upgrade|failed-upgrade|abort-install|abort-upgrade|disappear)
- ;;
-
- *)
- echo "postrm called with unknown argument \`$1'" >&2
- exit 1
- ;;
-esac
-
-# dh_installdeb will replace this with shell code automatically
-# generated by other debhelper scripts.
-
-#DEBHELPER#
-
-exit 0
Modified: freepbx/trunk/debian/freepbx-mysql.install
===================================================================
--- freepbx/trunk/debian/freepbx-mysql.install 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/freepbx-mysql.install 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,2 +1,2 @@
-debian/mysql/freepbx-install-mysql.sh usr/share/freepbx-common/
-debian/mysql/freepbx-remove-mysql.sh usr/share/freepbx-common/
+debian/mysql/install-sql usr/share/freepbx-common/
+debian/mysql/remove-sql usr/share/freepbx-common/
Modified: freepbx/trunk/debian/freepbx-sqlite3.install
===================================================================
--- freepbx/trunk/debian/freepbx-sqlite3.install 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/freepbx-sqlite3.install 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,2 +1,2 @@
-debian/sqlite3/freepbx-install-sqlite.sh usr/share/freepbx-common/
-debian/sqlite3/freepbx-remove-sqlite.sh usr/share/freepbx-common/
+debian/sqlite3/install-sql usr/share/freepbx-common/
+debian/sqlite3/remove-sql usr/share/freepbx-common/
Deleted: freepbx/trunk/debian/mysql/freepbx-install-mysql.sh
===================================================================
--- freepbx/trunk/debian/mysql/freepbx-install-mysql.sh 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/mysql/freepbx-install-mysql.sh 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,105 +0,0 @@
-#!/bin/sh
-
-# Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>,
-# Diego Iastrubni <diego.iastrubni at xorcom.com>
-# Copyright (C) 2005, Xorcom
-#
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script to generate the needed SQL tables by AMPortal
-
-
-# quoted from the daily cron of mysql:
-MYSQL="mysql --defaults-extra-file=/etc/mysql/debian.cnf"
-MYSQLADMIN="mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf"
-SQLDIR=/usr/share/freepbx-common/sql
-SQL_HOST=localhost
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-# if you do not want this script to fill the databases with the default
-# values, set the environment variable CLEANDB to "1":
-# CLEANDB=1 /usr/share/freepbx-common/freepbx-install-db
-# by default, it will create the tables with the default values from
-# freepbx
-
-CLEANDB=${CLEANDB:-0}
-
-exec_command()
-{
- CMD=$1
- $CMD
-}
-
-create_db()
-{
- DB=$1
- DB_USER=$2
- DB_PASSWD=$3
- SQL_INPUT=$4
-
- if [ ! -d /var/lib/mysql/$DB ]; then
- exec_command "$MYSQLADMIN create $DB";
- fi
-
- CMD="GRANT SELECT,INSERT,UPDATE,DELETE,CREATE,DROP,ALTER ON $DB.* TO $DB_USER@$SQL_HOST IDENTIFIED BY '$DB_PASSWD';"
-# echo $CMD
- echo $CMD | $MYSQL mysql
-
-
- if [ $CLEANDB != "1" ]; then
- # in case this breaks in the middle, we need to still be able
- # to run everything. So we need to prevent failed INSERTs from
- # bumping the whole process
- perl -n -e 'unless (/INSERT/ .. /[;]/){print}' $SQL_INPUT | $MYSQL $DB
- perl -n -e 'if (/INSERT/ .. /[;]/){s/\n//; s/;/\n/; print}' $SQL_INPUT \
- | while read new_insert_line
- # insert this line if it has not been already inserted.
- # TODO: update if an insert has failed?
- do echo $new_insert_line | $MYSQL $DB &>/dev/null || true
- done
- fi
-}
-
-if [ ! -f /etc/amportal.conf ]; then
- echo "amportal configuration not found, please install amportal.conf"
- echo " cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
- echo "Modify it to your needs and run this script again."
- exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "xxx$AMPDBUSER" == "xxx" ]; then
- echo "AMPDBUSER is not configured on /etc/amportal.conf" >&2
- echo "please update configuration and run /usr/share/freepbx-common/apply_conf.sh" >&2
- exit 1
-fi
-
-if [ "xxx$AMPDBPASS" == "xxx" ]; then
- echo "AMPDBPASS is not configured on /etc/amportal.conf" >&2
- echo "please update configuration and run /usr/share/freepbx-common/apply_conf.sh" >&2
- exit 1
-fi
-
-echo "creating asterisk DB"
-create_db "asterisk" "$AMPDBUSER" "$AMPDBPASS" "$SQLDIR/newinstall.sql"
-
-echo "creating asteriskcdr DB"
-create_db "asteriskcdrdb" "$AMPDBUSER" "$AMPDBPASS" "$SQLDIR/cdr_mysql_table.sql"
-
Deleted: freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh
===================================================================
--- freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,57 +0,0 @@
-#!/bin/sh
-
-# Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>,
-# Diego Iastrubni <diego.iastrubni at xorcom.com>
-# Copyright (C) 2005, Xorcom
-#
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script to generate the needed SQL tables by AMPortal
-# needs to be run as root
-
-# quoted from the daily cron of mysql:
-MYSQL="mysql --defaults-extra-file=/etc/mysql/debian.cnf -f"
-MYSQLADMIN="mysqladmin --defaults-extra-file=/etc/mysql/debian.cnf -f"
-
-
-exec_command()
-{
- CMD=$1
-
- if [ "$DEBUG" == "1" ] ; then
- echo "$CMD"
- fi
- $CMD
-}
-
-delete_db()
-{
- DB=$1
-
- if [ -d /var/lib/mysql/$DB ]; then
- echo "Dropping $DB ... "
- exec_command "$MYSQLADMIN DROP $DB";
- fi
-}
-
-
-delete_db "asterisk"
-delete_db "asteriskcdrdb"
-
-echo
-echo "The freepbx databases have been purged"
-echo
Copied: freepbx/trunk/debian/mysql/install-sql (from rev 3221, freepbx/trunk/debian/mysql/freepbx-install-mysql.sh)
Copied: freepbx/trunk/debian/mysql/remove-sql (from rev 3221, freepbx/trunk/debian/mysql/freepbx-remove-mysql.sh)
Modified: freepbx/trunk/debian/rules
===================================================================
--- freepbx/trunk/debian/rules 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/rules 2007-03-11 10:15:28 UTC (rev 3222)
@@ -51,7 +51,7 @@
uudecode --output-file=$@ $<
IMAGES_BASE:=xorcom.png xorcom-ts1.png xorcom-rapid.png
-IMAGES:=$(IMAGES_BASE:%=debian/rapid/%)
+IMAGES:=$(IMAGES_BASE:%=debian/share/%)
build: build-stamp
build-stamp: patch-stamp
@@ -65,8 +65,6 @@
dh_testroot
rm -f build-arch-stamp build-indep-stamp #CONFIGURE-STAMP#
rm -f $(IMAGES)
-# rm -f debian/rapid/sounds/*.gsm
-# rm -f amp_conf/mohmp3/*.wav*
dh_clean
@@ -104,27 +102,9 @@
chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-enable-all-modules
# chmod +x debian/freepbx-common/usr/sbin/update-freepbx
-# chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-install-mysql.sh
-# chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-install-sqlite.sh
-# chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-remove-mysql.sh
-# chmod +x debian/freepbx-common/usr/share/freepbx-common/freepbx-remove-sqlite.sh
+ chmod +x debian/freepbx-{sqlite3,mysql}/usr/share/freepbx-common/remove-sql
+ chmod +x debian/freepbx-{sqlite3,mysql}/usr/share/freepbx-common/install-sql
- mv debian/freepbx-mysql/usr/share/freepbx-common/freepbx-remove-mysql.sh debian/freepbx-mysql/usr/share/freepbx-common/remove-sql
- mv debian/freepbx-mysql/usr/share/freepbx-common/freepbx-install-mysql.sh debian/freepbx-mysql/usr/share/freepbx-common/install-sql
- chmod +x debian/freepbx-mysql/usr/share/freepbx-common/remove-sql
- chmod +x debian/freepbx-mysql/usr/share/freepbx-common/install-sql
-
- mv debian/freepbx-sqlite3/usr/share/freepbx-common/freepbx-remove-sqlite.sh debian/freepbx-sqlite3/usr/share/freepbx-common/remove-sql
- mv debian/freepbx-sqlite3/usr/share/freepbx-common/freepbx-install-sqlite.sh debian/freepbx-sqlite3/usr/share/freepbx-common/install-sql
- chmod +x debian/freepbx-sqlite3/usr/share/freepbx-common/remove-sql
- chmod +x debian/freepbx-sqlite3/usr/share/freepbx-common/install-sql
-
-# lintian does not handle this php4-cgi | php5-cgi now
-# mkdir -p debian/freepbx-common/usr/share/lintian/overrides/
-# cp debian/lintian debian/freepbx-common/usr/share/lintian/overrides/freepbx-admin
-# mkdir -p debian/freepbx-agi/usr/share/lintian/overrides/
-# cp debian/lintian debian/freepbx-agi/usr/share/lintian/overrides/freepbx-agi
-
# Must not depend on anything. This is to be called by
# binary-arch/binary-indep
# in another 'make' thread.
Copied: freepbx/trunk/debian/share (from rev 3221, freepbx/trunk/debian/rapid)
Deleted: freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh
===================================================================
--- freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,58 +0,0 @@
-#!/bin/sh
-
-# Written by Diego Iastrubni <diego.iastrubni at xorcom.com>
-# Copyright (C) 2006, Xorcom
-#
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script for generating SQLite tables for freepbx
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-if [ ! -f /etc/amportal.conf ]; then
- echo "amportal configuration not found, please install amportal.conf"
- echo " cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
- echo "Modify it to your needs and run this script again."
- exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "$AMPDBENGINE" != "sqlite" ]; then
- echo "freePBX is not configured to work with SQLite"
- echo "Plese edit /etc/amportal.conf to your needs and run this script again"
- exit 1
-fi
-
-if [ "x$AMPDBFILE" == "x" ]; then
- echo "No database file is configured in /etc/amportal.conf"
- echo "Plese edit /etc/amportal.conf to your needs and run this script again"
- exit 1
-fi
-
-AMPDBDIR=`dirname $AMPDBFILE`
-
-mkdir -p $AMPDBDIR
-touch $AMPDBFILE
-chown asterisk.asterisk $AMPDBFILE
-chmod 660 $AMPDBFILE
-
-
-echo "creating asterisk DB at $AMPDBFILE"
-cat /usr/share/freepbx-common/sql/newinstall.sqlite.sql | sqlite $AMPDBFILE
-
Deleted: freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh
===================================================================
--- freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh 2007-03-11 08:33:49 UTC (rev 3221)
+++ freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh 2007-03-11 10:15:28 UTC (rev 3222)
@@ -1,56 +0,0 @@
-#!/bin/sh
-
-# Written by Tzafrir Cohen <tzafrir.cohen at xorcom.com>,
-# Diego Iastrubni <diego.iastrubni at xorcom.com>
-# Copyright (C) 2005, Xorcom
-#
-# All rights reserved.
-#
-# This program is free software; you can redistribute it and/or modify
-# it under the terms of the GNU General Public License as published by
-# the Free Software Foundation; either version 2 of the License, or
-# (at your option) any later version.
-#
-# This program is distributed in the hope that it will be useful,
-# but WITHOUT ANY WARRANTY; without even the implied warranty of
-# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
-# GNU General Public License for more details.
-#
-# You should have received a copy of the GNU General Public License
-# along with this program; if not, write to the Free Software
-# Foundation, Inc., 675 Mass Ave, Cambridge, MA 02139, USA.
-
-# a small script for purging SQLite tables for freepbx
-
-DEF_ADMIN_USER="admin"
-DEF_ADMIN_PASSWD="admin"
-
-if [ ! -f /etc/amportal.conf ]; then
- echo "amportal configuration not found, please install amportal.conf"
- echo " cp /usr/share/freepbx-common/amportal.conf /etc/amportal.conf"
- echo "Modify it to your needs and run this script again."
- exit 1
-fi
-
-. /etc/amportal.conf
-
-if [ "$AMPDBENGINE" != "sqlite" ]; then
- echo "FreePBX is not configured to work with SQLite"
- echo "Ignoring..."
- exit
-fi
-
-if [ "x$AMPDBFILE" == "x" ]; then
- echo "No database file is configured in /etc/amportal.conf"
- echo "Ignoring..."
- exit
-fi
-
-
-echo -n "Deleting SQLite database $AMPDBFILE"
-rm -f $AMPDBFILE
-echo "."
-
-echo
-echo "The freepbx databases have been purged"
-echo
Copied: freepbx/trunk/debian/sqlite3/install-sql (from rev 3221, freepbx/trunk/debian/sqlite3/freepbx-install-sqlite.sh)
Copied: freepbx/trunk/debian/sqlite3/remove-sql (from rev 3221, freepbx/trunk/debian/sqlite3/freepbx-remove-sqlite.sh)
More information about the Pkg-voip-commits
mailing list