mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
lint
This commit is contained in:
@@ -1,6 +1,6 @@
|
|||||||
#!/usr/bin/env bashio
|
#!/usr/bin/env bashio
|
||||||
|
|
||||||
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."
|
||||||
|
|
||||||
# Check data location
|
# Check data location
|
||||||
LOCATION=$(bashio::config 'data_location')
|
LOCATION=$(bashio::config 'data_location')
|
||||||
@@ -12,24 +12,24 @@ bashio::log.warning "Warning : a custom data location was selected, but the prev
|
|||||||
fi
|
fi
|
||||||
|
|
||||||
# Create folder
|
# Create folder
|
||||||
if [ ! -d "$LOCATION" ]; then
|
if [ ! -d "$LOCATION" ]; then
|
||||||
echo "Creating $LOCATION"
|
echo "Creating $LOCATION"
|
||||||
mkdir -p "$LOCATION"
|
mkdir -p "$LOCATION"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
touch "$LOCATION"/database.sqlite
|
touch "$LOCATION"/database.sqlite
|
||||||
|
|
||||||
if [ ! -d "$LOCATION"/resources ]; then
|
if [ ! -d "$LOCATION"/resources ]; then
|
||||||
mkdir -p "$LOCATION"/resources
|
mkdir -p "$LOCATION"/resources
|
||||||
fi
|
fi
|
||||||
ln -s $LOCATION/resources /home/joplin/packages/server
|
ln -s "$LOCATION"/resources /home/joplin/packages/server
|
||||||
|
|
||||||
chown -R joplin:joplin "$LOCATION"
|
chown -R joplin:joplin "$LOCATION"
|
||||||
chmod -R 777 "$LOCATION"
|
chmod -R 777 "$LOCATION"
|
||||||
chmod 777 "$LOCATION/database.sqlite"
|
chmod 777 "$LOCATION/database.sqlite"
|
||||||
export SQLITE_DATABASE="$LOCATION/database.sqlite"
|
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"
|
||||||
|
|
||||||
bashio::config.has_value 'DB_CLIENT' && export DB_CLIENT=$(bashio::config 'DB_CLIENT') && bashio::log.info 'Database client set'
|
bashio::config.has_value 'DB_CLIENT' && export DB_CLIENT=$(bashio::config 'DB_CLIENT') && bashio::log.info 'Database client set'
|
||||||
|
|||||||
Reference in New Issue
Block a user