forked from acouzens/open5gs
Fix the WebUI installation bug
This commit is contained in:
parent
1cc6736fa8
commit
0a9f2e5c40
|
@ -230,7 +230,7 @@ done
|
|||
|
||||
print_status 'Adding the MongoDB signing key to your keyring...'
|
||||
|
||||
if [ -x /usr/bin/crl ]; then
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
exec_cmd_nobail "curl -sLf -o /dev/null 'https://www.mongodb.org/static/pgp/server-6.0.asc' | apt-key add -"
|
||||
else
|
||||
exec_cmd_nobail "wget -qO /dev/null -o /dev/null 'https://www.mongodb.org/static/pgp/server-6.0.asc' | apt-key add -"
|
||||
|
@ -256,7 +256,7 @@ fi
|
|||
install() {
|
||||
print_status "Download the Open5GS Source Code (v${VERSION})..."
|
||||
if [ -x /usr/bin/curl ]; then
|
||||
exec_cmd "curl -sLf 'https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
exec_cmd "curl -sLf -o /dev/null 'https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
RC=$?
|
||||
else
|
||||
exec_cmd "wget -qO- /dev/null 'https://github.com/open5gs/${PACKAGE}/archive/v${VERSION}.tar.gz' | tar zxf -"
|
||||
|
@ -269,7 +269,7 @@ if [[ $RC != 0 ]]; then
|
|||
fi
|
||||
|
||||
print_status "Build the Open5GS WebUI..."
|
||||
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm ci && npm run build"
|
||||
exec_cmd "cd ./${PACKAGE}-${VERSION}/webui && npm clean-install && npm run build"
|
||||
|
||||
print_status "Install the Open5GS WebUI..."
|
||||
exec_cmd "mv ./${PACKAGE}-${VERSION}/webui /usr/lib/node_modules/${PACKAGE}"
|
||||
|
@ -296,14 +296,14 @@ EOF"
|
|||
exec_cmd_nobail "systemctl daemon-reload"
|
||||
exec_cmd "systemctl enable open5gs-webui"
|
||||
exec_cmd "deb-systemd-invoke start open5gs-webui"
|
||||
|
||||
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
|
||||
}
|
||||
|
||||
postinstall() {
|
||||
|
||||
print_status "Default Administrator Account [Username:admin, Password:1423]..."
|
||||
exec_cmd "mongosh open5gs ./mongo-init.js"
|
||||
exec_cmd "mongosh open5gs ./${PACKAGE}-${VERSION}/docs/assets/webui/mongo-init.js"
|
||||
|
||||
exec_cmd "rm -rf ./${PACKAGE}-${VERSION}"
|
||||
}
|
||||
|
||||
## Defer setup until we have the complete script
|
||||
|
|
Loading…
Reference in New Issue