yggdrasil-go/contrib/ui/nas-drobo/Content/scripts.sh
vadym d8a4000141 1. added multipath protocol and schema suport
2. added SCTP protocol and schema support
3. added set of NAS models support (Asustor, ReadyNAS, Drobo, QNAP, WD, Synology, Terramaster)
4. moved to fc00::/7 private segment
5. added Windows, MacOS and Linux UI for peers edit and current status
2022-10-27 22:03:37 +03:00

40 lines
818 B
Bash

#!/usr/bin/env sh
tmpdir="/tmp/DroboApps/mesh"
errorfile="${tmpdir}/error.txt"
base_dir="/mnt/DroboFS/Shares/DroboApps/mesh"
config_dir="$base_dir/config"
config_file="$config_dir/mesh.conf"
prog_dir="$(dirname "$(realpath "${0}")")"
_install() {
if [ ! -f "${errorfile}" ]
then
mkdir -p "${tmpdir}"
if [ ! -f "$config_file" ]; then
echo 3 > "${errorfile}"
fi
fi
ln -s $base_dir/var/log/mesh.log $base_dir/www/log
# install apache 2.x
/usr/bin/DroboApps.sh install_version apache 2
}
_uninstall() {
pid=`pidof -s mesh`
if [ -z "$pid" ]; then
echo "mesh was not running"
else
kill "$pid"
fi
}
_update() {
/bin/sh "${prog_dir}/service.sh" stop
cd "$base_dir"
rm -rf $(ls | grep -v 'host_uid.txt\|var\|config')
echo 'update successful' > "${prog_dir}/update.log"
}