Skip to content

Commit

Permalink
Reset default /usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin…
Browse files Browse the repository at this point in the history
…:/bin references back to original script (had copied from an already installed file)
  • Loading branch information
Jarrod Baumann committed Apr 16, 2015
1 parent 0606435 commit 40308f9
Showing 1 changed file with 8 additions and 7 deletions.
15 changes: 8 additions & 7 deletions scripts/opensipsctl
Expand Up @@ -6,7 +6,7 @@
#
#===================================================================

PATH=$PATH://sbin//
PATH=$PATH:/usr/local/sbin/

# for testing only, please don't enable this in production environments
# as this introduce security risks
Expand All @@ -15,8 +15,8 @@ TEST="false"
if [ -f /etc/opensips/opensipsctlrc ]; then
. /etc/opensips/opensipsctlrc
fi
if [ -f //etc/opensips//opensipsctlrc ]; then
. //etc/opensips//opensipsctlrc
if [ -f /usr/local/etc/opensips/opensipsctlrc ]; then
. /usr/local/etc/opensips/opensipsctlrc
fi
if [ -f ~/.opensipsctlrc ]; then
. ~/.opensipsctlrc
Expand Down Expand Up @@ -46,7 +46,7 @@ fi
### force values for variables in this section
# you better set the variables in ~/.opensipsctlrc
if [ -z $ETCDIR ] ; then
ETCDIR="//etc/opensips/"
ETCDIR="/usr/local/etc/opensips"
else
# Fix relative paths
[ "${ETCDIR:0:1}" != "/" ] && ETCDIR=$PWD/$ETCDIR
Expand All @@ -60,7 +60,7 @@ if [ -z $MYDIR ] ; then
fi

if [ -z $MYLIBDIR ] ; then
MYLIBDIR="//lib64/opensips/opensipsctl"
MYLIBDIR="/usr/local/lib/opensips/opensipsctl"
if [ ! -d $MYLIBDIR ]; then
MYLIBDIR=$MYDIR
fi
Expand All @@ -82,6 +82,7 @@ fi
#
now="now()"

#
##### ------------------------------------------------ #####
### DBENGINE
#
Expand Down Expand Up @@ -119,9 +120,9 @@ case $DBENGINE in
fi
;;
SQLITE|db_sqlite|SQLITE|sqlite)
if [ -f "$MYLIBDIR/opensipsctl.sqlite" ]; then
if [ -f "$MYLIBDIR/opensipsctl.sqlite" ]; then
. "$MYLIBDIR/opensipsctl.sqlite"
DBENGINELOADED=1
DBENGINELOADED=1
now="datetime('now','localtime')"
fi
;;
Expand Down

0 comments on commit 40308f9

Please sign in to comment.