mirror of
https://github.com/hassio-addons/addon-tasmoadmin.git
synced 2025-05-04 19:11:26 +00:00
Change nginx startup logic to ensure file permission on every startup (#471)
This commit is contained in:
parent
0946b65da0
commit
033ff52588
1 changed files with 5 additions and 5 deletions
|
@ -11,13 +11,13 @@ if ! bashio::fs.directory_exists "/data/tasmoadmin"; then
|
||||||
|
|
||||||
# Setup structure
|
# Setup structure
|
||||||
cp -R /var/www/tasmoadmin/data /data/tasmoadmin
|
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
|
fi
|
||||||
|
|
||||||
|
# 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 {} \;
|
||||||
|
|
||||||
bashio::log.debug 'Symlinking data directory to persistent storage location...'
|
bashio::log.debug 'Symlinking data directory to persistent storage location...'
|
||||||
rm -f -r /var/www/tasmoadmin/data
|
rm -f -r /var/www/tasmoadmin/data
|
||||||
ln -s /data/tasmoadmin /var/www/tasmoadmin/data
|
ln -s /data/tasmoadmin /var/www/tasmoadmin/data
|
||||||
|
|
Loading…
Add table
Add a link
Reference in a new issue