mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-11 18:31:02 +01:00
Fix data direcatory
This commit is contained in:
@@ -2,5 +2,6 @@
|
||||
$CONFIG = array (
|
||||
'memcache.local' => '\OC\Memcache\APCu',
|
||||
'datadirectory' => '%%datadirectory%%',
|
||||
'overwriteprotocol' => 'https',
|
||||
);
|
||||
|
||||
|
||||
@@ -1,10 +1,12 @@
|
||||
#!/bin/bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
ocpath="${NEXTCLOUD_PATH}"
|
||||
htuser='abc'
|
||||
htgroup='abc'
|
||||
rootuser='root'
|
||||
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
|
||||
printf "Creating possible missing Directories\n"
|
||||
mkdir -p $ocpath/data
|
||||
mkdir -p $ocpath/assets
|
||||
@@ -17,7 +19,7 @@ mkdir -p $ocpath/themes
|
||||
mkdir -p /data/config/nextcloud/config
|
||||
mkdir -p /data/config/nextcloud/data
|
||||
mkdir -p /data/config/www/nextcloud/occ 2>/dev/null
|
||||
mkdir -p /share/nextcloud
|
||||
mkdir -p $datadirectory
|
||||
mkdir -p /ssl/nextcloud/keys
|
||||
|
||||
printf "chmod Files and Directories. This could take some time, please wait...\n"
|
||||
@@ -36,7 +38,7 @@ chown -R ${htuser}:${htgroup} ${ocpath}/config/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/data/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/themes/
|
||||
chown -R ${htuser}:${htgroup} ${ocpath}/updater/
|
||||
chown -R ${htuser}:${htgroup} /share/nextcloud
|
||||
chown -R ${htuser}:${htgroup} ${datadirectory}
|
||||
chown -R ${htuser}:${htgroup} /ssl/nextcloud/keys || true
|
||||
|
||||
chmod +x ${ocpath}/occ
|
||||
|
||||
@@ -2,11 +2,12 @@
|
||||
|
||||
PUID=$(bashio::config "PUID")
|
||||
PGID=$(bashio::config "PGID")
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
|
||||
groupmod -o -g "$PGID" abc
|
||||
usermod -o -u "$PUID" abc
|
||||
mkdir -p /data/config
|
||||
mkdir -p /share/nextcloud
|
||||
mkdir -p $datadirectory
|
||||
echo '
|
||||
-------------------------------------
|
||||
_ ()
|
||||
|
||||
@@ -1,14 +1,15 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
#create folders
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
mkdir -p \
|
||||
/share/nextcloud \
|
||||
$datadirectory \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data
|
||||
|
||||
#permissions
|
||||
chown abc:abc \
|
||||
/share/nextcloud \
|
||||
$datadirectory \
|
||||
/data/config/nextcloud/config \
|
||||
/data/config/nextcloud/data
|
||||
|
||||
|
||||
@@ -1,8 +1,9 @@
|
||||
#!/usr/bin/with-contenv bash
|
||||
#!/usr/bin/with-contenv bashio
|
||||
|
||||
# Change data directory
|
||||
datadirectory=$(bashio::config 'data_directory')
|
||||
sed -i "s/%%datadirectory%%/${datadirectory}/g" /defaults/config.php
|
||||
bashio::log.info "Setting data diretory: ${datadirectory}"
|
||||
sed -i "s|%%datadirectory%%|$datadirectory|g" /defaults/config.php
|
||||
|
||||
# copy config
|
||||
[[ ! -f /data/config/www/nextcloud/config/config.php ]] && \
|
||||
|
||||
Reference in New Issue
Block a user