mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-03-03 16:00:29 +01:00
Update 99-run.sh
This commit is contained in:
@@ -39,20 +39,25 @@ done
|
|||||||
bashio::log.info "Setting data location"
|
bashio::log.info "Setting data location"
|
||||||
DATA_LOCATION=$(bashio::config 'data_location')
|
DATA_LOCATION=$(bashio::config 'data_location')
|
||||||
|
|
||||||
echo "Check $DATA_LOCATION folder exists"
|
echo "... check $DATA_LOCATION folder exists"
|
||||||
mkdir -p "$DATA_LOCATION"/media
|
mkdir -p "$DATA_LOCATION"
|
||||||
mkdir -p /shared
|
|
||||||
|
|
||||||
chmod -R 777 "$DATA_LOCATION"/media
|
echo "... setting permissions"
|
||||||
chmod -R 777 "/shared"
|
chown -R seafile:seafile "$DATA_LOCATION"
|
||||||
|
|
||||||
echo "Setting permissions"
|
echo "... exporting variables symlink"
|
||||||
if bashio::config.has_value 'PUID'; then
|
export SEAFILE_CONF_DIR="$DATA_LOCATION/conf"
|
||||||
chown -R "$(bashio::config 'PUID'):$(bashio::config 'PGID')" "$DATA_LOCATION"
|
export SEAFILE_LOGS_DIR="$DATA_LOCATION/logs"
|
||||||
chown -R "$(bashio::config 'PUID'):$(bashio::config 'PGID')" /shared
|
export SEAFILE_DATA_DIR="$DATA_LOCATION/seafile-data"
|
||||||
fi || true
|
export SEAFILE_SEAHUB_DIR="$DATA_LOCATION/seahub-data"
|
||||||
|
export SEAFILE_SQLITE_DIR="$DATA_LOCATION/sqlite"
|
||||||
|
export DATABASE_DIR="$DATA_LOCATION/db"
|
||||||
|
|
||||||
|
#for folder in "/conf" "/logs" "/media" "/seafile-data" "/seahub-data" "/sqlite"; do
|
||||||
|
#ln -sf "$DATA_LOCATION"/media /opt/
|
||||||
|
#
|
||||||
|
#done
|
||||||
|
|
||||||
echo "Creating symlink"
|
|
||||||
#ln -sf "$DATA_LOCATION"/media /shared
|
#ln -sf "$DATA_LOCATION"/media /shared
|
||||||
|
|
||||||
#export SEAFILE_CONF_DIR="$DATA_LOCATION/conf" && sed -i "1a export SEAFILE_CONF_DIR=$DATA_LOCATION/conf" /home/seafile/*.sh
|
#export SEAFILE_CONF_DIR="$DATA_LOCATION/conf" && sed -i "1a export SEAFILE_CONF_DIR=$DATA_LOCATION/conf" /home/seafile/*.sh
|
||||||
@@ -60,7 +65,7 @@ echo "Creating symlink"
|
|||||||
#export SEAFILE_DATA_DIR="$DATA_LOCATION/seafile-data" && sed -i "1a export SEAFILE_DATA_DIR=$DATA_LOCATION/seafile-data" /home/seafile/*.sh
|
#export SEAFILE_DATA_DIR="$DATA_LOCATION/seafile-data" && sed -i "1a export SEAFILE_DATA_DIR=$DATA_LOCATION/seafile-data" /home/seafile/*.sh
|
||||||
#export SEAFILE_SEAHUB_DIR="$DATA_LOCATION/seahub-data" && sed -i "1a export SEAFILE_SEAHUB_DIR=$DATA_LOCATION/seahub-data" /home/seafile/*.sh
|
#export SEAFILE_SEAHUB_DIR="$DATA_LOCATION/seahub-data" && sed -i "1a export SEAFILE_SEAHUB_DIR=$DATA_LOCATION/seahub-data" /home/seafile/*.sh
|
||||||
#export SEAFILE_SQLITE_DIR="$DATA_LOCATION/sqlite" && sed -i "1a export SEAFILE_SQLITE_DIR=$DATA_LOCATION/sqlite" /home/seafile/*.sh
|
#export SEAFILE_SQLITE_DIR="$DATA_LOCATION/sqlite" && sed -i "1a export SEAFILE_SQLITE_DIR=$DATA_LOCATION/sqlite" /home/seafile/*.sh
|
||||||
export DATABASE_DIR="$DATA_LOCATION/db" && sed -i "1a export DATABASE_DIR=$DATA_LOCATION/db" /home/seafile/*.sh
|
#export DATABASE_DIR="$DATA_LOCATION/db" && sed -i "1a export DATABASE_DIR=$DATA_LOCATION/db" /home/seafile/*.sh
|
||||||
|
|
||||||
###################
|
###################
|
||||||
# Define database #
|
# Define database #
|
||||||
|
|||||||
Reference in New Issue
Block a user