mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-04 19:11:26 +00:00
🔨 Rebranding to TasmoAdmin
This commit is contained in:
parent
df688cbae2
commit
70ca14ad7c
29 changed files with 116 additions and 151 deletions
23
tasmoadmin/rootfs/etc/cont-init.d/13-persistent-data.sh
Normal file
23
tasmoadmin/rootfs/etc/cont-init.d/13-persistent-data.sh
Normal file
|
@ -0,0 +1,23 @@
|
|||
#!/usr/bin/with-contenv bash
|
||||
# ==============================================================================
|
||||
# Community Hass.io Add-ons: TasmoAdmin
|
||||
# Ensures data is store in a persistent location
|
||||
# ==============================================================================
|
||||
# shellcheck disable=SC1091
|
||||
source /usr/lib/hassio-addons/base.sh
|
||||
|
||||
if ! hass.directory_exists "/data/tasmoadmin"; then
|
||||
hass.log.debug 'Data directory not initialized, doing that now...'
|
||||
|
||||
# Setup structure
|
||||
cp -R /var/www/tasmoadmin/data /data/tasmoadmin
|
||||
|
||||
# Ensure file permissions
|
||||
chown -R nginx:nginx /data/tasmoadmin
|
||||
find /data/tasmoadmin -not -perm 0644 -type f -exec chmod 0644 {} \;
|
||||
find /data/tasmoadmin -not -perm 0755 -type d -exec chmod 0755 {} \;
|
||||
fi
|
||||
|
||||
hass.log.debug 'Symlinking data directory to persistent storage location...'
|
||||
rm -f -r /var/www/tasmoadmin/data
|
||||
ln -s /data/tasmoadmin /var/www/tasmoadmin/data
|
Loading…
Add table
Add a link
Reference in a new issue