forked from acouzens/open5gs
Rename dbconf.sh to open5gs-dbctl (#388)
This commit is contained in:
parent
3d6a84ca85
commit
db13836426
|
@ -50,11 +50,6 @@ foreach file : example_conf
|
|||
configuration : conf_data)
|
||||
endforeach
|
||||
|
||||
configure_file(
|
||||
input : '../misc/dbconf.sh',
|
||||
output : 'open5gs_db',
|
||||
configuration : conf_data)
|
||||
|
||||
subdir('open5gs')
|
||||
subdir('freeDiameter')
|
||||
subdir('systemd')
|
||||
|
|
|
@ -3,3 +3,4 @@ usr/lib/*/libfd*.so*
|
|||
usr/lib/*/freeDiameter/*.fdx
|
||||
configs/freeDiameter/cacert.pem /etc/freeDiameter
|
||||
configs/logrotate/open5gs /etc/logrotate.d
|
||||
misc/db/open5gs-dbctl
|
||||
|
|
|
@ -2,4 +2,3 @@ usr/bin/open5gs-hssd
|
|||
configs/freeDiameter/hss.* etc/freeDiameter
|
||||
configs/open5gs/hss.yaml etc/open5gs
|
||||
configs/systemd/open5gs-hssd.service lib/systemd/system
|
||||
configs/open5gs_db /usr/bin
|
|
@ -111,6 +111,7 @@ add_project_arguments(
|
|||
subdir('configs')
|
||||
subdir('lib')
|
||||
subdir('src')
|
||||
subdir('misc')
|
||||
# Don’t build the tests unless we can run them (either natively or in an exe wrapper)
|
||||
build_tests = not meson.is_cross_build() or (meson.is_cross_build() and meson.has_exe_wrapper())
|
||||
if build_tests
|
||||
|
|
|
@ -2,8 +2,5 @@
|
|||
* Network Configuration
|
||||
$ sudo ./misc/netconf.sh
|
||||
|
||||
* Add/Update/Remove A User
|
||||
$ ./misc/dbconf.sh
|
||||
|
||||
* Generate Key & Cert for Diameter
|
||||
$ ./misc/make_certs.sh ./freeDiameter
|
||||
|
|
|
@ -0,0 +1,2 @@
|
|||
* Add/Update/Remove A User
|
||||
$ ./misc/db/open5gs-dbctl
|
|
@ -0,0 +1,27 @@
|
|||
# Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
# This file is part of Open5GS.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
misc_db = '''
|
||||
open5gs-dbctl
|
||||
'''.split()
|
||||
|
||||
foreach file : misc_db
|
||||
configure_file(
|
||||
input : file,
|
||||
output : file,
|
||||
configuration : conf_data)
|
||||
endforeach
|
|
@ -3,7 +3,7 @@
|
|||
version=0.9.0
|
||||
|
||||
display_help() {
|
||||
echo "dbconf.sh: Open5GS Database Configuration Tool ($version)"
|
||||
echo "open5gs-dbctl: Open5GS Database Configuration Tool ($version)"
|
||||
echo "COMMANDS:" >&2
|
||||
echo " add {imsi key opc}: adds a user to the database with default values"
|
||||
echo " remove {imsi}: removes a user from the database"
|
||||
|
@ -46,13 +46,13 @@ if [ "$1" = "add" ]; then
|
|||
exit 0
|
||||
fi
|
||||
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh add imsi key opc\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl add imsi key opc\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
if [ "$1" = "remove" ]; then
|
||||
if [ "$#" -ne 2 ]; then
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh remove imsi\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl remove imsi\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -63,7 +63,7 @@ fi
|
|||
|
||||
if [ "$1" = "reset" ]; then
|
||||
if [ "$#" -ne 1 ]; then
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh reset\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl reset\""
|
||||
exit 1
|
||||
fi
|
||||
|
||||
|
@ -73,7 +73,7 @@ fi
|
|||
|
||||
if [ "$1" = "static_ip" ]; then
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh static_ip imsi ip\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl static_ip imsi ip\""
|
||||
exit 1
|
||||
fi
|
||||
IMSI=$2
|
||||
|
@ -85,7 +85,7 @@ fi
|
|||
|
||||
if [ "$1" = "static_ip6" ]; then
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh static_ip6 imsi ip\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl static_ip6 imsi ip\""
|
||||
exit 1
|
||||
fi
|
||||
IMSI=$2
|
||||
|
@ -97,7 +97,7 @@ fi
|
|||
|
||||
if [ "$1" = "type" ]; then
|
||||
if [ "$#" -ne 3 ]; then
|
||||
echo "dbconf.sh: incorrect number of args, format is \"dbconf.sh type imsi type\""
|
||||
echo "open5gs-dbctl: incorrect number of args, format is \"open5gs-dbctl type imsi type\""
|
||||
exit 1
|
||||
fi
|
||||
IMSI=$2
|
|
@ -0,0 +1,31 @@
|
|||
# Copyright (C) 2019 by Sukchan Lee <acetcom@gmail.com>
|
||||
|
||||
# This file is part of Open5GS.
|
||||
|
||||
# This program is free software: you can redistribute it and/or modify
|
||||
# it under the terms of the GNU Affero General Public License as published by
|
||||
# the Free Software Foundation, either version 3 of the License, or
|
||||
# (at your option) any later version.
|
||||
#
|
||||
# This program is distributed in the hope that it will be useful,
|
||||
# but WITHOUT ANY WARRANTY; without even the implied warranty of
|
||||
# MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. See the
|
||||
# GNU General Public License for more details.
|
||||
#
|
||||
# You should have received a copy of the GNU General Public License
|
||||
# along with this program. If not, see <https://www.gnu.org/licenses/>.
|
||||
|
||||
conf_data = configuration_data()
|
||||
|
||||
conf_data.set('bindir', bindir)
|
||||
conf_data.set('sysconfdir', sysconfdir)
|
||||
conf_data.set('libdir', libdir)
|
||||
conf_data.set('localstatedir', localstatedir)
|
||||
|
||||
if host_system == 'linux'
|
||||
conf_data.set('loopback_devname', 'lo')
|
||||
else
|
||||
conf_data.set('loopback_devname', 'lo0')
|
||||
endif
|
||||
|
||||
subdir('db')
|
Loading…
Reference in New Issue