mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-05-31 12:54:04 +02:00
Update 99-run.sh
This commit is contained in:
@@ -38,7 +38,7 @@ sqlite_internal)
|
|||||||
bashio::log.info "Using built in sqlite"
|
bashio::log.info "Using built in sqlite"
|
||||||
# Set variable
|
# Set variable
|
||||||
export DB_CONNECTION=sqlite
|
export DB_CONNECTION=sqlite
|
||||||
export DB_DATABASE=/config/addons_config/fireflyiii/database/database.sqlite
|
#export DB_DATABASE=/config/addons_config/fireflyiii/database/database.sqlite
|
||||||
# Creating database
|
# Creating database
|
||||||
mkdir -p /config/addons_config/fireflyiii/database
|
mkdir -p /config/addons_config/fireflyiii/database
|
||||||
rm -r /var/www/html/storage/database
|
rm -r /var/www/html/storage/database
|
||||||
@@ -94,29 +94,31 @@ mariadb_addon)
|
|||||||
|
|
||||||
esac
|
esac
|
||||||
|
|
||||||
# Install database
|
|
||||||
bashio::log.info "Updating database"
|
|
||||||
php artisan migrate --seed >/dev/null
|
|
||||||
php artisan firefly-iii:upgrade-database >/dev/null
|
|
||||||
|
|
||||||
################
|
################
|
||||||
# CRON OPTIONS #
|
# CRON OPTIONS #
|
||||||
################
|
################
|
||||||
|
|
||||||
# Align update with options
|
if bashio::config.has_value 'Updates'; then
|
||||||
echo ""
|
# Align update with options
|
||||||
FREQUENCY=$(bashio::config 'Updates')
|
echo ""
|
||||||
bashio::log.info "$FREQUENCY updates"
|
FREQUENCY=$(bashio::config 'Updates')
|
||||||
echo ""
|
bashio::log.info "$FREQUENCY updates"
|
||||||
|
echo ""
|
||||||
|
|
||||||
# Sets cron // do not delete this message
|
# Sets cron // do not delete this message
|
||||||
cp /templates/cronupdate /etc/cron.${FREQUENCY}/
|
cp /templates/cronupdate /etc/cron.${FREQUENCY}/
|
||||||
chmod 775 /etc/cron.${FREQUENCY}/cronupdate
|
chmod 775 /etc/cron.${FREQUENCY}/cronupdate
|
||||||
|
fi
|
||||||
|
|
||||||
##############
|
##############
|
||||||
# LAUNCH APP #
|
# LAUNCH APP #
|
||||||
##############
|
##############
|
||||||
|
|
||||||
|
# Install database
|
||||||
|
bashio::log.info "Updating database"
|
||||||
|
php artisan migrate --seed
|
||||||
|
php artisan firefly-iii:upgrade-database
|
||||||
|
|
||||||
bashio::log.info "Please wait while the app is loading !"
|
bashio::log.info "Please wait while the app is loading !"
|
||||||
|
|
||||||
/./usr/local/bin/entrypoint.sh
|
/./usr/local/bin/entrypoint.sh
|
||||||
|
|||||||
Reference in New Issue
Block a user