|
@@ -238,24 +238,45 @@ kamailio_create () # pars: <database name>
|
|
exit 1
|
|
exit 1
|
|
fi
|
|
fi
|
|
|
|
|
|
- kamailio_db_create $1
|
|
|
|
|
|
+ if [ "$DBINITASK" = "yes" ]; then
|
|
|
|
+ get_answer "ask" "Create the database '$1'? (y/n): "
|
|
|
|
+ else
|
|
|
|
+ ANSWER="y"
|
|
|
|
+ fi
|
|
|
|
+ if [ "$ANSWER" = "y" ]; then
|
|
|
|
+ kamailio_db_create $1
|
|
|
|
+ fi
|
|
|
|
|
|
- kamailio_db_grant $1
|
|
|
|
|
|
+ if [ "$DBINITASK" = "yes" ]; then
|
|
|
|
+ get_answer "ask" "Create database users with access privileges? (y/n): "
|
|
|
|
+ else
|
|
|
|
+ ANSWER="y"
|
|
|
|
+ fi
|
|
|
|
+ if [ "$ANSWER" = "y" ]; then
|
|
|
|
+ kamailio_db_grant $1
|
|
|
|
+ fi
|
|
|
|
|
|
- standard_create $1
|
|
|
|
|
|
+ if [ "$DBINITASK" = "yes" ]; then
|
|
|
|
+ get_answer "ask" "Create the standard database tables? (y/n): "
|
|
|
|
+ else
|
|
|
|
+ ANSWER="y"
|
|
|
|
+ fi
|
|
|
|
+ if [ "$ANSWER" = "y" ]; then
|
|
|
|
+ standard_create $1
|
|
|
|
+ fi
|
|
|
|
|
|
- get_answer $INSTALL_PRESENCE_TABLES "Install presence related tables? (y/n): "
|
|
|
|
|
|
+ get_answer $INSTALL_PRESENCE_TABLES "Create the presence related tables? (y/n): "
|
|
if [ "$ANSWER" = "y" ]; then
|
|
if [ "$ANSWER" = "y" ]; then
|
|
presence_create $1
|
|
presence_create $1
|
|
fi
|
|
fi
|
|
|
|
|
|
- get_answer $INSTALL_EXTRA_TABLES "Install tables for $EXTRA_MODULES? (y/n): "
|
|
|
|
|
|
+ get_answer $INSTALL_EXTRA_TABLES "Create the tables for $EXTRA_MODULES? (y/n): "
|
|
if [ "$ANSWER" = "y" ]; then
|
|
if [ "$ANSWER" = "y" ]; then
|
|
HAS_EXTRA="yes"
|
|
HAS_EXTRA="yes"
|
|
extra_create $1
|
|
extra_create $1
|
|
fi
|
|
fi
|
|
|
|
|
|
- get_answer $INSTALL_DBUID_TABLES "Install tables for $DBUID_MODULES? (y/n): "
|
|
|
|
|
|
+ get_answer $INSTALL_DBUID_TABLES "Create the tables for $DBUID_MODULES? (y/n): "
|
|
if [ "$ANSWER" = "y" ]; then
|
|
if [ "$ANSWER" = "y" ]; then
|
|
HAS_EXTRA="yes"
|
|
HAS_EXTRA="yes"
|
|
dbuid_create $1
|
|
dbuid_create $1
|