use /usr/share/bbb-graphql-server as conf source

This commit is contained in:
Anton Georgiev 2023-07-19 11:28:44 -04:00
parent 334a83a1b2
commit 6689a91ece
4 changed files with 8 additions and 7 deletions

View File

@ -7,7 +7,7 @@ case "$1" in
purge)
# remove
rm -rf /usr/local/bin/bbb-graphql-middleware
rm -rf /etc/default/bbb-graphql-middleware
rm -rf /usr/share/bbb-graphql-middleware
;;
upgrade)
;;

View File

@ -8,7 +8,7 @@ case "$1" in
sudo -u postgres psql -c "alter user postgres password 'bbb_graphql'"
sudo -u postgres psql -c "drop database if exists bbb_graphql"
sudo -u postgres psql -c "create database bbb_graphql"
sudo -u postgres psql -U postgres -d bbb_graphql -a -f /etc/default/bbb-graphql-server/bbb_schema.sql --set ON_ERROR_STOP=on
sudo -u postgres psql -U postgres -d bbb_graphql -a -f /usr/share/bbb-graphql-server/bbb_schema.sql --set ON_ERROR_STOP=on
sudo -u postgres psql -c "drop database if exists hasura_app"
sudo -u postgres psql -c "create database hasura_app"
@ -18,10 +18,10 @@ case "$1" in
startService bbb-graphql-server || echo "bbb-graphql-server service could not be registered or started"
# Apply BBB metadata in Hasura
cd /etc/default/bbb-graphql-server
cd /usr/share/bbb-graphql-server
/usr/local/bin/hasura/hasura metadata apply
cd ..
rm -rf /etc/default/bbb-graphql-server/metadata
rm -rf /usr/share/bbb-graphql-server/metadata
;;
abort-upgrade|abort-remove|abort-deconfigure)

View File

@ -7,7 +7,7 @@ case "$1" in
purge)
rm -rf /usr/local/bin/hasura
rm -rf /usr/local/bin/hasura-graphql-engine
rm -rf /etc/default/bbb-graphql-server
rm -rf /usr/share/bbb-graphql-server
;;
upgrade)
;;

View File

@ -17,7 +17,7 @@ rm -rf staging
# package
# Create directories for fpm to process
DIRS="/usr/local/bin/hasura-graphql-engine /etc/default/bbb-graphql-server /lib/systemd/system /usr/local/bin/hasura"
DIRS="/usr/local/bin/hasura-graphql-engine /etc/default /usr/share/bbb-graphql-server /lib/systemd/system /usr/local/bin/hasura"
for dir in $DIRS; do
mkdir -p staging$dir
done
@ -28,7 +28,8 @@ rm -rf hasura-graphql-engine/
chmod +x hasura-graphql
cp -r hasura-graphql staging/usr/local/bin/hasura-graphql-engine
cp -r hasura-config.env bbb_schema.sql metadata config.yaml staging/etc/default/bbb-graphql-server
cp -r hasura-config.env staging/etc/default/bbb-graphql-server
cp -r bbb_schema.sql metadata config.yaml staging/usr/share/bbb-graphql-server
cp ./bbb-graphql-server.service staging/lib/systemd/system/bbb-graphql-server.service