-
Notifications
You must be signed in to change notification settings - Fork 0
/
install_plugin_linux.sh
executable file
·36 lines (30 loc) · 1.08 KB
/
install_plugin_linux.sh
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
#!/bin/bash
## Copyright © 2024 Seagate Technology LLC and/or its Affiliates
set -e
### Setup Fuse Allow Other
FUSE_CONF="/etc/fuse.conf"
# Check if "user_allow_other" is already in the file
if grep -q "^user_allow_other" "$FUSE_CONF"
then
echo "user_allow_other is already set in $FUSE_CONF"
else
# Check if "user_allow_other" is in the file but commented out
if grep -q "^#user_allow_other" "$FUSE_CONF"
then
sudo sed -i 's/^#user_allow_other/user_allow_other/' "$FUSE_CONF"
echo "Uncommented user_allow_other in $FUSE_CONF"
else
# If not found, add "user_allow_other" to the file
echo "user_allow_other" | sudo tee -a "$FUSE_CONF" > /dev/null
echo "Added user_allow_other added to $FUSE_CONF"
fi
fi
### Install Cloudfuse
echo "Installing Cloudfuse"
apt-get install libssl-dev
apt-get install ./cloudfuse*.deb
### Install plugin
echo "Installing Cloudfuse plugin"
cp cloudfuse_plugin.so /opt/networkoptix-metavms/mediaserver/bin/plugins/
systemctl restart networkoptix-mediaserver.service
echo "Finished installing Cloudfuse plugin"