mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 02:11:01 +01:00
hadolint
This commit is contained in:
@@ -1,4 +1,5 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Allow OCR setting
|
||||
OCRLANG="$(bashio::config "ocrlang")"
|
||||
|
||||
@@ -1,24 +1,25 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
##################
|
||||
# SELECT FOLDERS #
|
||||
##################
|
||||
|
||||
#Set media dir
|
||||
MEDIADIR='"'$(bashio::config 'storage_dir')'"'
|
||||
#clean data
|
||||
sed -i '/MEDIA_DIR/d' /data/config/papermerge.conf.py
|
||||
#add data
|
||||
sed -i "2 i\MEDIA_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Storage dir set to $MEDIADIR"
|
||||
#Set media dir
|
||||
MEDIADIR='"'$(bashio::config 'storage_dir')'"'
|
||||
#clean data
|
||||
sed -i '/MEDIA_DIR/d' /data/config/papermerge.conf.py
|
||||
#add data
|
||||
sed -i "2 i\MEDIA_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Storage dir set to $MEDIADIR"
|
||||
|
||||
#Set import dir
|
||||
IMPORTDIR='"'$(bashio::config 'import_dir')'"'
|
||||
#clean data
|
||||
sed -i '/IMPORTER_DIR/d' /data/config/papermerge.conf.py || true
|
||||
#add data
|
||||
sed -i "2 i\IMPORTER_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Import dir set to $IMPORTDIR"
|
||||
#Set import dir
|
||||
IMPORTDIR='"'$(bashio::config 'import_dir')'"'
|
||||
#clean data
|
||||
sed -i '/IMPORTER_DIR/d' /data/config/papermerge.conf.py || true
|
||||
#add data
|
||||
sed -i "2 i\IMPORTER_DIR = $MEDIADIR" /data/config/papermerge.conf.py
|
||||
bashio::log.info "Import dir set to $IMPORTDIR"
|
||||
|
||||
##################
|
||||
# CREATE FOLDERS #
|
||||
@@ -30,16 +31,14 @@ if [ ! -d /config ]; then
|
||||
fi
|
||||
chown -R abc:abc /config
|
||||
|
||||
|
||||
if [ ! -d $MEDIADIR ]; then
|
||||
echo "Creating $MEDIADIR"
|
||||
mkdir -p $MEDIADIR
|
||||
fi
|
||||
chown -R abc:abc $MEDIADIR
|
||||
|
||||
|
||||
if [ ! -d $IMPORTDIR ]; then
|
||||
echo "Creating $IMPORTDIR"
|
||||
mkdir -p $IMPORTDIR
|
||||
fi
|
||||
fi
|
||||
chown -R abc:abc $IMPORTDIR
|
||||
|
||||
Reference in New Issue
Block a user