mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-03 16:00:29 +01:00
Update 71-newfeatures.sh
This commit is contained in:
@@ -116,6 +116,13 @@ if bashio::config.true "SPECIES_CONVERTER"; then
|
||||
fi
|
||||
fi
|
||||
|
||||
# Convert Adminer to iframe
|
||||
if ! grep "iframe src=\'scripts/adminer.php" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
||||
sed -i '/scripts\/adminer.php\/c\ <button type=\\"submit\\" name=\\"view\\" value=\\"Adminer\\" form=\\"views\\">Database Maintenance</button>' "$HOME"/BirdNET-Pi/homepage/views.php
|
||||
sed -i "/if\(\$_GET\['view'\] == \"Webterm\"\){/i test" "$HOME"/BirdNET-Pi/homepage/views.php
|
||||
sed -i "s|deny|SameOrigin|g" "$HOME"/BirdNET-Pi/scripts/adminer.php
|
||||
fi
|
||||
|
||||
# Add weekly report button
|
||||
if ! grep -q "Weekly Report" "$HOME"/BirdNET-Pi/homepage/views.php; then
|
||||
sed -i "67a\ <button type=\"submit\" name=\"view\" value=\"Weekly Report\" form=\"views\">Weekly Report</button>" "$HOME"/BirdNET-Pi/homepage/views.php
|
||||
|
||||
Reference in New Issue
Block a user