mirror of
https://dev.iopsys.eu/bbf/bbfdm.git
synced 2025-12-09 23:34:38 +01:00
43 lines
1 KiB
Bash
Executable file
43 lines
1 KiB
Bash
Executable file
#!/bin/bash
|
|
|
|
echo "# Preparation script ..."
|
|
|
|
# link '/bin/sh' to bash instead of dash
|
|
ln -sf bash /bin/sh
|
|
|
|
#cleanup
|
|
rm -f /etc/config/*
|
|
rm -rf /tmp/bbfdm/.bbfdm/* /tmp/bbfdm/.cwmp/* /tmp/bbfdm/.usp/*
|
|
|
|
echo "Installing bbfdm rpcd utilities"
|
|
cp -r ./test/files/etc/* /etc/
|
|
cp -r ./test/files/usr/* /usr/
|
|
cp -r ./test/files/var/* /var/
|
|
cp -r ./test/files/tmp/* /tmp/
|
|
cp -r ./test/files/lib/* /lib/
|
|
|
|
mkdir -p /tmp/bbfdm/.bbfdm /tmp/bbfdm/.cwmp /tmp/bbfdm/.usp
|
|
mkdir -p /usr/libexec/rpcd/
|
|
|
|
cp utilities/files/usr/libexec/rpcd/bbf.diag /usr/libexec/rpcd/
|
|
cp utilities/files/usr/libexec/rpcd/bbf.secure /usr/libexec/rpcd/
|
|
|
|
cp ./gitlab-ci/core_service.conf /etc/supervisor/conf.d/
|
|
cp ./gitlab-ci/reload_service.conf /etc/supervisor/conf.d/
|
|
|
|
if [ -n "$1" ]; then
|
|
if [ "$1" == "bbfdm" ]; then
|
|
cp ./gitlab-ci/full_micro_service.conf /etc/supervisor/conf.d/
|
|
else
|
|
cp ./gitlab-ci/micro_service.conf /etc/supervisor/conf.d/
|
|
fi
|
|
fi
|
|
|
|
rm -f /etc/bbfdm/dmmap/*
|
|
|
|
echo "Starting base services..."
|
|
supervisorctl reread
|
|
supervisorctl update
|
|
sleep 10
|
|
|
|
ubus list
|