remove necessity of sudo to run deploy script
This commit is contained in:
parent
98c0a24669
commit
7f8188c336
@ -1,9 +1,4 @@
|
|||||||
#!/usr/bin/env bash
|
#!/usr/bin/env bash
|
||||||
if [ "$EUID" -ne 0 ]; then
|
|
||||||
echo "Please run this script as root ( or with sudo )" ;
|
|
||||||
exit 1;
|
|
||||||
fi;
|
|
||||||
|
|
||||||
|
|
||||||
cd "$(dirname "$0")"
|
cd "$(dirname "$0")"
|
||||||
|
|
||||||
@ -11,15 +6,15 @@ for var in "$@"
|
|||||||
do
|
do
|
||||||
if [[ $var == --reset ]] ; then
|
if [[ $var == --reset ]] ; then
|
||||||
echo "Performing a full reset..."
|
echo "Performing a full reset..."
|
||||||
rm -rf node_modules
|
sudo rm -rf node_modules
|
||||||
fi
|
fi
|
||||||
done
|
done
|
||||||
|
|
||||||
if [ ! -d ./node_modules ] ; then
|
if [ ! -d ./node_modules ] ; then
|
||||||
npm ci --no-progress
|
sudo npm ci --no-progress
|
||||||
fi
|
fi
|
||||||
|
|
||||||
npm run build
|
sudo npm run build
|
||||||
|
|
||||||
# handle renaming circa dec 2023
|
# handle renaming circa dec 2023
|
||||||
if [[ -d /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server ]] ; then
|
if [[ -d /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server ]] ; then
|
||||||
@ -29,7 +24,7 @@ if [[ -d /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server ]] ; then
|
|||||||
sudo rm -rf /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server
|
sudo rm -rf /usr/local/bigbluebutton/bbb-graphql-actions-adapter-server
|
||||||
fi
|
fi
|
||||||
|
|
||||||
mv -f dist/index.js dist/bbb-graphql-actions.js
|
sudo mv -f dist/index.js dist/bbb-graphql-actions.js
|
||||||
sudo cp -rf dist/* /usr/local/bigbluebutton/bbb-graphql-actions
|
sudo cp -rf dist/* /usr/local/bigbluebutton/bbb-graphql-actions
|
||||||
sudo systemctl restart bbb-graphql-actions
|
sudo systemctl restart bbb-graphql-actions
|
||||||
echo ''
|
echo ''
|
||||||
|
Loading…
Reference in New Issue
Block a user