forked from OpenSIPS/opensips
-
Notifications
You must be signed in to change notification settings - Fork 0
/
Copy pathopensipsctl.db_berkeley
61 lines (53 loc) · 1.35 KB
/
opensipsctl.db_berkeley
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
# $Id: opensipsctl.db_berkeley 4382 2008-06-12 11:04:51Z henningw $
#
# opensips control; tool for maintaining opensips's databases
#
# History:
# --------
# 2007-11-05 genesis (wiquan)
#===================================================================
# path to the db_berkeley directory
if [ -z "$DB_PATH" ] ; then
DB_PATH="/usr/local/share/opensips/db_berkeley/opensips"
fi
#===================================================================
opensips_bdb() {
case $1 in
reload)
shift
if [ "$#" -lt 1 ] ; then
merr "reload - too few parameters"
exit 1
fi
$CTLCMD bdb_reload $1
exit $?
;;
*)
usage
exit 1
;;
esac
}
# domain don't support reload at the moment
usage_domain() {
echo
mecho " -- command 'domain' - manage domains"
echo
cat <<EOF
domain show ........................ show list of served domains
domain add <domainname> ............ add a new served domain
domain rm <domainname> ............. remove a served domain
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_domain"
# showdb is not implemented for SQL databases
usage_showdb() {
echo
mecho " -- command 'showdb|userdb' - dump offline users"
echo
cat <<EOF
showdb ............................. display offline users
userdb ............................. display offline users
EOF
}
USAGE_FUNCTIONS="$USAGE_FUNCTIONS usage_showdb"