Check to make sure that the sip_buddies table exists if the db exists, before altering it.
git-svn-id: http://wush.net/svn/range/software/public/subscriberRegistry/trunk@6574 19bc5d8c-e614-43d4-8b26-e1612bc8e597
This commit is contained in:
parent
2c0ed0e5db
commit
9674c87589
|
@ -1,4 +1,4 @@
|
|||
#!/bin/sh
|
||||
#!/bin/bash
|
||||
# postinst script for test
|
||||
#
|
||||
# see: dh_installdeb(1)
|
||||
|
@ -39,7 +39,7 @@ fi
|
|||
chown -R root:www-data $SR_DIR
|
||||
chmod 775 $SR_DIR
|
||||
|
||||
if [ -e $SRPATH ]; then
|
||||
if [[ -e $SRPATH && "`sqlite3 $SRPATH "PRAGMA table_info(sip_buddies)"`" != "" ]]; then
|
||||
if [ ! -e $SR_CONFIG_BACKUP ]; then
|
||||
sqlite3 $SRPATH ".dump" > $SR_CONFIG_BACKUP
|
||||
fi
|
||||
|
|
Loading…
Reference in New Issue