Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Mount_WebUI func overwrites menuTree.js addon entries rather than appending #5

Open
BryceReedman opened this issue Apr 13, 2022 · 0 comments

Comments

@BryceReedman
Copy link

BryceReedman commented Apr 13, 2022

if [ ! -f "/tmp/menuTree.js" ]; then
cp -f "/www/require/modules/menuTree.js" "/tmp/"
fi
sed -i "\\~$MyPage~d" /tmp/menuTree.js
if ! grep -q 'menuName: "Addons"' /tmp/menuTree.js ; then
lineinsbefore="$(( $(grep -n "exclude:" /tmp/menuTree.js | cut -f1 -d':') - 1))"
sed -i "$lineinsbefore"'i,\n{\nmenuName: "Addons",\nindex: "menu_Addons",\ntab: [\n{url: "ext/shared-jy/redirect.htm", tabName: "Help & Support"},\n{url: "NULL", tabName: "__INHERIT__"}\n]\n}' /tmp/menuTree.js
fi
if ! grep -q "javascript:window.open('/ext/shared-jy/redirect.htm'" /tmp/menuTree.js ; then
sed -i "s~ext/shared-jy/redirect.htm~javascript:window.open('/ext/shared-jy/redirect.htm','_blank')~" /tmp/menuTree.js
fi
sed -i "/url: \"javascript:window.open('\/ext\/shared-jy\/redirect.htm'/i {url: \"$MyPage\", tabName: \"Suricata\"}," /tmp/menuTree.js
umount /www/require/modules/menuTree.js 2>/dev/null
mount -o bind /tmp/menuTree.js /www/require/modules/menuTree.js

Issue

Script appears to overwrite entries in the menuTree resulting in addon webpages not being listed under "Addons"

For example, spdMerlin's webpage will not be listed in the tabmenu in the addons page.

fixed via
./suricata_stats uninstall

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

1 participant