mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-03 22:34:11 +02:00
Update start.sh
This commit is contained in:
@@ -46,12 +46,20 @@ fi
|
|||||||
export BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80)
|
export BASE_URL=$(bashio::config 'BASE_URL'):$(bashio::addon.port 80)
|
||||||
export LANG=$(bashio::config 'LANG')
|
export LANG=$(bashio::config 'LANG')
|
||||||
export DB_TYPE=$(bashio::config 'DB_TYPE')
|
export DB_TYPE=$(bashio::config 'DB_TYPE')
|
||||||
if [ $DB_TYPE = "sqlite" ]; then
|
[ $DB_TYPE = "sqlite" ] && bashio::log.info "Using a local sqlite database $WEBTREES_HOME/$DB_NAME please wait then login. Default credentials : $WT_USER : $WT_PASS"
|
||||||
#export WT_USER=$(bashio::config 'WT_USER')
|
|
||||||
#export WT_NAME=$(bashio::config 'WT_NAME')
|
#####################
|
||||||
#export WT_PASS=$(bashio::config 'WT_PASS')
|
# DATABASE LOCATION #
|
||||||
#export WT_EMAIL=$(bashio::config 'WT_EMAIL')
|
#####################
|
||||||
bashio::log.info "Using a local sqlite database $WEBTREES_HOME/$DB_NAME please wait then login with $WT_USER : $WT_PASS"
|
|
||||||
|
# Change data location
|
||||||
|
NEW_WEBTREES_HOME=$(bashio::config 'WEBTREES_HOME')
|
||||||
|
|
||||||
|
if [ ! -d $NEW_WEBTREES_HOME ]; then
|
||||||
|
export WEBTREES_HOME="/data/webtrees"
|
||||||
|
grep -rl "/var/www/webtrees" /etc/ | xargs sed -i 's|/var/www/webtrees|$WEBTREES_HOME|g' \
|
||||||
|
else
|
||||||
|
bashio::log.fatal "$WEBTREES_HOME not found, using internal addon data"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
################
|
################
|
||||||
@@ -95,7 +103,7 @@ chown -R www-data:www-data /data/webtrees
|
|||||||
|
|
||||||
# Execute main script
|
# Execute main script
|
||||||
cd /
|
cd /
|
||||||
./docker-entrypoint.sh
|
./docker-entrypoint.sh >/dev/null
|
||||||
|
|
||||||
############
|
############
|
||||||
# END INFO #
|
# END INFO #
|
||||||
|
|||||||
Reference in New Issue
Block a user