1. Peter Gradwell
  2. opensips-clone

Commits

razv...@689a6050-402a-0410-94f2-e92a70836424  committed 3c0c8b0 Draft

-fixed path in osipsconsole when installing
Closes bug #3365035

  • Participants
  • Parent commits 2cd6162
  • Branches default

Comments (0)

Files changed (2)

File Makefile

View file
  • Ignore whitespace
 		cat scripts/osipsconsole | \
 		sed -e "s#PATH_BIN[ \t]*=[ \t]*\"\./\"#PATH_BIN = \"$(bin-target)\"#g" | \
 		sed -e "s#PATH_CTLRC[ \t]*=[ \t]*\"\./scripts/\"#PATH_CTLRC = \"$(cfg-target)\"#g" | \
+		sed -e "s#PATH_LIBS[ \t]*=[ \t]*\"\./scripts/\"#PATH_LIBS = \"$(lib-target)/opensipsctl/\"#g" | \
+		sed -e "s#PATH_SHARE[ \t]*=[ \t]*\"\./scripts/\"#PATH_SHARE = \"$(data-target)\"#g" | \
 		sed -e "s#PATH_ETC[ \t]*=[ \t]*\"\./etc/\"#PATH_ETC = \"$(cfg-target)\"#g" \
 		> /tmp/osipsconsole
 		$(INSTALL_TOUCH) $(bin-prefix)/$(bin-dir)/osipsconsole

File scripts/osipsconsole

View file
  • Ignore whitespace
 ####path to the directory where opensips binaries are...
 my $PATH_BIN = "./";
 my $PATH_CTLRC = "./scripts/";
-my $PATH_ETC = "/usr/local/etc";
-my $PATH_LIBS = "/usr/local/lib";
-my $PATH_SHARE = "/usr/local/share";
+my $PATH_ETC = "./etc/";
+my $PATH_LIBS = "./scripts/";
+my $PATH_SHARE = "./scripts/";
 
 my $OSIPSCONSOLERC = "";
 ### include config files
 #my $NO_USER_INIT = "NO";
 my $MYSQL = "";
 my $PGSQL = "";
-my $MYLIBDIR = $PATH_LIBS."/opensips/opensipsctl";
-my $DBTEXTCMD = $MYLIBDIR."/dbtextdb/dbtextdb.py";
+my $DBTEXTCMD = $PATH_LIBS."/dbtextdb/dbtextdb.py";
 
 # path to the database schemas
 my $DB_SCHEMA = "";
-my $DATA_DIR = $PATH_SHARE."/opensips";
-my $DBTEXT_PATH = $PATH_SHARE."/opensips/dbtext/opensips";
+my $DATA_DIR = $PATH_SHARE;
+my $DBTEXT_PATH = $PATH_SHARE."/dbtext/opensips";
 # path to the db_berkeley database
 my $DB_PATH;
 if ( $DB_PATH eq "" ) {
 sub dbtext_opensips_create () { # pars: <database name>
 	my ( $DB_PATH, $TABLE, $ANSWER );
 
-        if ( -d $DATA_DIR."/mysql" ) {
-                $DB_SCHEMA=$DATA_DIR."/dbtext/opensips";
-        } else {
-                $DB_SCHEMA="./dbtest/opensips";
-        }
+	&validate_dbdata("dbtext/opensips");
 
 	if ( $#_ != 0 ) {
 		print "opensips_create function takes one param (DB_PATH)\n";
 
 sub bdb_opensips_drop() { # pars:  <DB_PATH>
 
-	my $TABLE;#my $DATA_DIR = $PATH_SHARE."/opensips";
+	my $TABLE;
 
 	if ( $#_ != 0 ) {
 		print "opensips_drop function takes one param\n";