mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-13 19:11:35 +02:00
Update 99-run.sh
This commit is contained in:
@@ -2,14 +2,6 @@
|
|||||||
|
|
||||||
bashio::log.warning "Warning - minimum configuration recommended : 2 cpu cores and 4 GB of memory. Otherwise the system will become unresponsive and crash."
|
bashio::log.warning "Warning - minimum configuration recommended : 2 cpu cores and 4 GB of memory. Otherwise the system will become unresponsive and crash."
|
||||||
|
|
||||||
|
|
||||||
# Create folder
|
|
||||||
echo "Creating $LOCATION"
|
|
||||||
mkdir -p "$LOCATION"
|
|
||||||
mkdir -p "$LOCATION"/resources
|
|
||||||
ln -s $LOCATION/resources /home/joplin/packages/server
|
|
||||||
|
|
||||||
|
|
||||||
# Check data location
|
# Check data location
|
||||||
LOCATION=$(bashio::config 'data_location')
|
LOCATION=$(bashio::config 'data_location')
|
||||||
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
if [[ "$LOCATION" = "null" || -z "$LOCATION" ]]; then
|
||||||
@@ -19,6 +11,14 @@ else
|
|||||||
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
|
bashio::log.warning "Warning : a custom data location was selected, but the previous folder will NOT be copied. You need to do it manually"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
# Create folder
|
||||||
|
echo "Creating $LOCATION"
|
||||||
|
mkdir -p "$LOCATION"
|
||||||
|
mkdir -p "$LOCATION"/resources
|
||||||
|
ln -s $LOCATION/resources /home/joplin/packages/server
|
||||||
|
|
||||||
|
export SQLITE_DATABASE="$LOCATION/database.sqlite"
|
||||||
|
|
||||||
if bashio::config.has_value 'POSTGRES_DATABASE'; then
|
if bashio::config.has_value 'POSTGRES_DATABASE'; then
|
||||||
bashio::log.info "Using postgres"
|
bashio::log.info "Using postgres"
|
||||||
|
|
||||||
@@ -32,8 +32,6 @@ else
|
|||||||
|
|
||||||
bashio::log.info "Using sqlite"
|
bashio::log.info "Using sqlite"
|
||||||
|
|
||||||
export SQLITE_DATABASE="$LOCATION/database.sqlite"
|
|
||||||
|
|
||||||
fi
|
fi
|
||||||
|
|
||||||
##############
|
##############
|
||||||
|
|||||||
Reference in New Issue
Block a user