mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-04 19:11:26 +00:00
✨ Initial add-on code
This commit is contained in:
parent
621cdfb0ea
commit
e853ef30b3
23 changed files with 1069 additions and 0 deletions
36
sonweb/rootfs/etc/cont-init.d/12-patches.sh
Normal file
36
sonweb/rootfs/etc/cont-init.d/12-patches.sh
Normal file
|
@ -0,0 +1,36 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: SonWEB
|
||||
# Applies patch to remove SelfUpdate, since that is useless shit in Docker
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
patch -F2 -R --ignore-whitespace /var/www/sonweb/includes/header.php <<'PATCH'
|
||||
--- header.php 2018-05-22 00:00:00.463304792 +0200
|
||||
+++ header.php 2018-05-22 00:00:00.291634513 +0200
|
||||
@@ -178,6 +178,15 @@
|
||||
</li>
|
||||
<?php endif; ?>
|
||||
|
||||
+ <?php if ( $loggedin ): ?>
|
||||
+ <li class="nav-item">
|
||||
+ <a class="nav-link <?php echo $page == "selfupdate" ? "active" : ""; ?>"
|
||||
+ href='<?php echo _BASEURL_; ?>selfupdate'>
|
||||
+ <?php echo __( "SELFUPDATE", "NAVI" ); ?>
|
||||
+ </a>
|
||||
+ </li>
|
||||
+ <?php endif; ?>
|
||||
+
|
||||
</ul>
|
||||
|
||||
|
||||
PATCH
|
||||
|
||||
# shellcheck disable=SC2181
|
||||
if [[ "$?" -ne 0 ]];
|
||||
then
|
||||
hass.die 'Patching SonWEB SelfUpdate failed'
|
||||
fi
|
||||
|
||||
hass.log.debug 'Applied SonWEB SelfUpdate fix'
|
Loading…
Add table
Add a link
Reference in a new issue