yggdrasil-go/contrib/ui/nas-qnap/package/package_routines
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

42 lines
1 KiB
Text

#script called from qinstall.sh
#SYS_QPKG_SERVICE_ENABLED="FALSE"
QPKG_NAME="mesh"
CONF=/etc/config/mesh.conf
PKG_PRE_REMOVE="{
killall -q mesh
rm -rf /share/Web/$QPKG_NAME
[ -L /var/log/mesh.log ] && rm -f /var/log/mesh.log
}"
PKG_MAIN_REMOVE="{
$CMD_RM -f $CONF
}"
pkg_pre_install(){
killall -q mesh
rm -rf /share/Web/$QPKG_NAME
}
pkg_install(){
exec 2>/tmp/mesh.log
set -x
if [ -f $CONF ]; then
mkdir -p /var/backups
echo "Backing up configuration file to /var/backups/mesh.conf.`date +%Y%m%d`"
cp $CONF /var/backups/mesh.conf.`date +%Y%m%d`
echo "Normalising and updating $CONF"
${SYS_QPKG_DIR}/bin/mesh -useconf -normaliseconf < /var/backups/mesh.conf.`date +%Y%m%d` > $CONF
else
echo "Generating initial configuration file $config_file"
echo "Please familiarise yourself with this file before starting RiV-mesh"
sh -c "umask 0027 && ${SYS_QPKG_DIR}/bin/mesh -genconf > '$CONF'"
fi
chmod a+w $CONF
}
pkg_post_install(){
ln -sf $SYS_QPKG_DIR/var/log/mesh.log $SYS_QPKG_DIR/www/log
}