OpenBTS working now

git-svn-id: http://wush.net/svn/range/software/public/openbts/trunk@5903 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
Kurtis Heimerl
2013-07-09 05:14:42 +00:00
parent a737b586d3
commit 7466de849a
4 changed files with 14 additions and 25 deletions

2
debian/control vendored
View File

@@ -12,5 +12,5 @@ Section: comm
Priority: optional
Architecture: any
Essential: no
Depends: sqlite3, libosip2-4, libusb-1.0-0, libortp8, libglib2.0-0, libgl1-mesa-glx, libc6-i686, libasound2, pkg-config, libpcre3, gawk, screen
Depends: sqlite3, libosip2-4, libusb-1.0-0, libortp8, libglib2.0-0, libgl1-mesa-glx, libc6, libasound2, pkg-config, libpcre3, gawk, sipauthserve-public
Description: OpenBTS Public Release.

12
debian/postinst vendored
View File

@@ -20,15 +20,15 @@
configure()
{
DATE=$(date --rfc-3339='date')
CONFIG_BACKUP=/etc/OpenBTS/OpenBTS.dump-$DATE
DB_LOC=/etc/OpenBTS/OpenBTS.db
DATE=$(date +'%Y-%m-%d.%H:%M:%S')
CONFIG_BACKUP=$DB_LOC.dump-$DATE
if [ ! -e $CONFIG_BACKUP ]; then
sqlite3 /etc/OpenBTS/OpenBTS.db ".dump" > $CONFIG_BACKUP
if [ -e $DB_LOC ]; then
sqlite3 $DB_LOC ".dump" > $CONFIG_BACKUP
fi
sqlite3 /etc/OpenBTS/OpenBTS.db ".read /etc/OpenBTS/OpenBTS.example.sql" > /dev/null 2>&1
sqlite3 $DB_LOC ".read /etc/OpenBTS/OpenBTS.example.sql" > /dev/null 2>&1
#chown openbts:openbts /home/openbts/CLI
#chown openbts:openbts /home/openbts/openbtsconfig

17
debian/preinst vendored
View File

@@ -13,26 +13,9 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
install()
{
INSTALL_DIR=/OpenBTS
DATE=$(date --rfc-3339='date')
BACKUP_DIR=$INSTALL_DIR/backup_$DATE
if [ -f $INSTALL_DIR/OpenBTS -a -f $INSTALL_DIR/transceiver ]; then
if [ ! -e $BACKUP_DIR ]; then
mkdir -p $BACKUP_DIR/
mv $INSTALL_DIR/OpenBTS $BACKUP_DIR/
mv $INSTALL_DIR/transceiver $BACKUP_DIR/
fi
fi
}
case "$1" in
install|upgrade)
install
;;
abort-upgrade)

8
debian/prerm vendored
View File

@@ -16,9 +16,15 @@ set -e
# for details, see http://www.debian.org/doc/debian-policy/ or
# the debian-policy package
APP=OpenBTS
remove()
{
killall OpenBTS &>/dev/null
if [ "$(pidof $APP)" ]; then
killall $APP
else
echo "$APP not running"
fi
}
case "$1" in