Fix: Ignore "bad" plugins (#70)

This commit is contained in:
Danp2 2020-04-05 10:07:51 -05:00 committed by GitHub
parent d15b30776a
commit 5273ad5b09
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -54,12 +54,21 @@ cd $xo_server_dir
cd packages/xo-server
cp sample.config.toml .xo-server.toml
dest=/usr/local/lib/node_modules/
#Create node_modules directory if doesn't exist
mkdir -p /usr/local/lib/node_modules/
mkdir -p $dest
# Plugins to ignore
ignoreplugins=("xo-server-test")
# Symlink all plugins
for source in $(ls -d /opt/xen-orchestra/packages/xo-server-*); do
ln -s "$source" /usr/local/lib/node_modules/
plugin=$(basename $source)
if [[ "${ignoreplugins[@]}" =~ $plugin ]]; then
echo "Ignoring $plugin plugin"
else
ln -s "$source" "$dest"
fi
done
if [[ ! -e $systemd_service_dir/$xo_service ]] ; then