mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-01-19 11:08:11 +01:00
Merge branch 'master' of https://github.com/alexbelgium/hassio-addons
This commit is contained in:
@@ -1,3 +1,8 @@
|
||||
### 27.0.2-10 (06-09-2023)
|
||||
- Minor bugs fixed
|
||||
### 27.0.2-9 (06-09-2023)
|
||||
- Minor bugs fixed
|
||||
|
||||
### 27.0.2-4 (05-09-2023)
|
||||
- Minor bugs fixed
|
||||
- Fit : new variable "default_phone_region" https://github.com/alexbelgium/hassio-addons/issues/981
|
||||
|
||||
@@ -28,8 +28,7 @@ FROM ${BUILD_FROM}${BUILD_UPSTREAM}
|
||||
# Set S6 wait time
|
||||
ENV S6_CMD_WAIT_FOR_SERVICES=1 \
|
||||
S6_CMD_WAIT_FOR_SERVICES_MAXTIME=0 \
|
||||
S6_SERVICES_GRACETIME=0 \
|
||||
S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||
S6_SERVICES_GRACETIME=0
|
||||
|
||||
# Specific modifications
|
||||
ARG CONFIGLOCATION="/share/nextcloud"
|
||||
@@ -50,18 +49,7 @@ RUN \
|
||||
sed -i "s|client_body_timeout 300s;|client_body_timeout 900s;|g" /defaults/nginx/site-confs/default.conf.sample && \
|
||||
\
|
||||
# Change location of log
|
||||
sed -i "s|s6-setuidgid abc php -f /config/www/nextcloud/cron.php|(s6-setuidgid abc php -f /config/www/nextcloud/cron.php) \&>/proc/1/fd/1|g" /etc/crontabs/root && \
|
||||
\
|
||||
# Run custom scripts after installation
|
||||
echo "touch /runfile" >> /etc/s6-overlay/s6-rc.d/init-nextcloud-config/run && \
|
||||
echo "/./etc/entrypoint.sh" >> /etc/s6-overlay/s6-rc.d/init-nextcloud-config/run && \
|
||||
\
|
||||
# Ensure correct data mount first
|
||||
sed -i "1a /./scripts2/00-banner.sh" /etc/s6-overlay/s6-rc.d/init-adduser/run && \
|
||||
sed -i "2a /./defaults/nextcloud-perms.sh" /etc/s6-overlay/s6-rc.d/init-adduser/run && \
|
||||
echo "/./scripts2/01-custom_script.sh" >> /etc/s6-overlay/s6-rc.d/init-adduser/run && \
|
||||
echo "/./scripts2/00-smb_mounts.sh" >> /etc/s6-overlay/s6-rc.d/init-adduser/run && \
|
||||
echo "/./scripts2/00-local_mounts.sh" >> /etc/s6-overlay/s6-rc.d/init-adduser/run
|
||||
sed -i "s|s6-setuidgid abc php -f /config/www/nextcloud/cron.php|(s6-setuidgid abc php -f /config/www/nextcloud/cron.php) \&>/proc/1/fd/1|g" /etc/crontabs/root
|
||||
|
||||
# Global LSIO modifications
|
||||
ARG CONFIGLOCATION="/data/config"
|
||||
@@ -122,7 +110,8 @@ VOLUME ["/share", "/ssl", "/data", "/media"]
|
||||
################
|
||||
|
||||
# Add entrypoint
|
||||
ADD --chmod=744 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
||||
ENV S6_STAGE2_HOOK=/ha_entrypoint.sh
|
||||
ADD --chmod=777 "https://raw.githubusercontent.com/alexbelgium/hassio-addons/master/.templates/ha_entrypoint.sh" "/ha_entrypoint.sh"
|
||||
|
||||
# Entrypoint modifications
|
||||
RUN \
|
||||
@@ -143,7 +132,10 @@ RUN \
|
||||
# Correct nginx files
|
||||
sed -i "/Strict-Transport-Security/d" /defaults/nginx/site-confs/default.conf.sample && \
|
||||
sed -i '1h;1!H;$!d;g;s/\(.*\)}/\1/' /defaults/nginx/site-confs/default.conf.sample && \
|
||||
cat /defaults/nginx_addition >> /defaults/nginx/site-confs/default.conf.sample
|
||||
cat /defaults/nginx_addition >> /defaults/nginx/site-confs/default.conf.sample && \
|
||||
\
|
||||
# Run custom scripts after installation
|
||||
echo "mv /scripts/* /etc/cont-init.d/ && /./ha_entrypoint.sh" >> /etc/s6-overlay/s6-rc.d/init-nextcloud-config/run
|
||||
|
||||
############
|
||||
# 5 Labels #
|
||||
|
||||
@@ -1,3 +1,4 @@
|
||||
## ⚠ Open Request : [✨ [REQUEST] Nextcloud default_phone_region variable under configurable (opened 2023-09-05)](https://github.com/alexbelgium/hassio-addons/issues/981) by [@panhans](https://github.com/panhans)
|
||||
# Home assistant add-on: Nextcloud
|
||||
|
||||
[![Donate][donation-badge]](https://www.buymeacoffee.com/alexbelgium)
|
||||
|
||||
@@ -125,6 +125,6 @@
|
||||
"slug": "nextcloud_ocr",
|
||||
"uart": true,
|
||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud",
|
||||
"version": "27.0.2-4",
|
||||
"version": "27.0.2-10",
|
||||
"webui": "https://[HOST]:[PORT:443]"
|
||||
}
|
||||
}
|
||||
|
||||
@@ -18,7 +18,7 @@ chown -R "$PUID:$PGID" "/data/config"
|
||||
# Check current version
|
||||
if [ -f /data/config/www/nextcloud/config/config.php ]; then
|
||||
datadirectory="$(sed -n "s|.*datadirectory.*' => '*\(.*[^ ]\) *',.*|\1|p" /data/config/www/nextcloud/config/config.php)"
|
||||
echo "... Data directory detected : $datadirectory"
|
||||
echo "... data directory detected : $datadirectory"
|
||||
else
|
||||
datadirectory=/share/nextcloud
|
||||
echo "Nextcloud is not installed yet, the default data directory is : $datadirectory. You can change it during nextcloud installation."
|
||||
@@ -30,22 +30,11 @@ if [[ "$datadirectory" == *"/mnt/"* ]] && [ ! -f "$datadirectory"/index.html ];
|
||||
bashio::addon.stop
|
||||
fi
|
||||
|
||||
mkdir -p "$datadirectory"
|
||||
echo "... setting permissions"
|
||||
mkdir -p "$datadirectory" 2>/dev/null || true
|
||||
chmod 755 -R "$datadirectory"/* 2>/dev/null || true
|
||||
chown -R "$PUID:$PGID" "$datadirectory"/* 2>/dev/null || true
|
||||
mkdir -p /scripts 2>/dev/null || true
|
||||
|
||||
######################
|
||||
# Modify config.json #
|
||||
######################
|
||||
|
||||
echo "Disabling check_data_directory_permissions"
|
||||
for files in /defaults/config.php /data/config/www/nextcloud/config/config.php; do
|
||||
if [ -f "$files" ]; then
|
||||
sed -i "/check_data_directory_permissions/d" "$files"
|
||||
sed -i "/datadirectory/a 'check_data_directory_permissions' => false," "$files"
|
||||
fi
|
||||
done
|
||||
timeout 10 sudo -u abc php /app/www/public/occ config:system:set check_data_directory_permissions --value=false --type=bool || echo "Please install nextcloud first"
|
||||
|
||||
echo "...done"
|
||||
echo "... done"
|
||||
echo " "
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
######################################
|
||||
# Make links between logs and docker #
|
||||
######################################
|
||||
@@ -78,20 +81,38 @@ echo " "
|
||||
# DISABLE MAINTENACE MODE #
|
||||
###########################
|
||||
|
||||
sudo -u abc -s /bin/bash -c "php /data/app/www/public/occ maintenance:mode --off" &>/dev/null || true
|
||||
echo "... Clean potential errors"
|
||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:repair" >/dev/null || true
|
||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:repair-share-owner" >/dev/null || true
|
||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ maintenance:mode --off"
|
||||
|
||||
##############
|
||||
# CLEAN OCDE #
|
||||
##############
|
||||
|
||||
sudo -u abc php /data/app/www/public/occ app:remove --no-interaction "richdocumentscode" &>/dev/null || true
|
||||
sudo -u abc php /data/app/www/public/occ app:remove --no-interaction "richdocumentscode_arm64" &>/dev/null || true
|
||||
sudo -u abc php /data/app/www/public/occ app:remove --no-interaction "richdocumentscode_amd64" &>/dev/null || true
|
||||
echo "... Remove OCDE if installed as not compatible"
|
||||
sudo -u abc php /app/www/public/occ app:remove --no-interaction "richdocumentscode" &>/dev/null || true
|
||||
sudo -u abc php /app/www/public/occ app:remove --no-interaction "richdocumentscode_arm64" &>/dev/null || true
|
||||
sudo -u abc php /app/www/public/occ app:remove --no-interaction "richdocumentscode_amd64" &>/dev/null || true
|
||||
|
||||
################
|
||||
# DEFINE PHONE #
|
||||
################
|
||||
|
||||
if bashio::config.has_value "default_phone_region"; then
|
||||
sudo -u abc php /data/app/www/public/occ config:system:set default_phone_region --value="$(bashio::config "default_phone_region")"
|
||||
echo "... Define default_phone_region"
|
||||
sudo -u abc php /app/www/public/occ config:system:set default_phone_region --value="$(bashio::config "default_phone_region")"
|
||||
fi
|
||||
|
||||
######################
|
||||
# Modify config.json #
|
||||
######################
|
||||
|
||||
echo "... Disabling check_data_directory_permissions"
|
||||
for files in /defaults/config.php /data/config/www/nextcloud/config/config.php; do
|
||||
if [ -f "$files" ]; then
|
||||
sed -i "/check_data_directory_permissions/d" "$files"
|
||||
sed -i "/datadirectory/a 'check_data_directory_permissions' => false," "$files"
|
||||
fi
|
||||
done
|
||||
timeout 10 sudo -u abc php /app/www/public/occ config:system:set check_data_directory_permissions --value=false --type=bool || echo "Please install nextcloud first"
|
||||
|
||||
@@ -1,6 +1,8 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
if bashio::services.available 'mysql'; then
|
||||
|
||||
|
||||
@@ -1,7 +1,6 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
|
||||
if bashio::config.true 'use_own_certs'; then
|
||||
|
||||
bashio::log.green "Using referenced ssl certificates"
|
||||
|
||||
@@ -1,8 +1,8 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
# Install specific packages
|
||||
if [ ! -d /data/config/www/nextcloud/apps/pdfannotate ]; then
|
||||
|
||||
@@ -2,6 +2,9 @@
|
||||
# shellcheck shell=bash
|
||||
# shellcheck disable=SC2086
|
||||
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
|
||||
@@ -1,6 +1,9 @@
|
||||
#!/usr/bin/with-contenv bashio
|
||||
# shellcheck shell=bash
|
||||
|
||||
# Runs only after initialization done
|
||||
if [ ! -f /app/www/public/occ ]; then cp /etc/cont-init.d/"$(basename "${BASH_SOURCE}")" /scripts/ && exit 0; fi
|
||||
|
||||
# Only execute if installed
|
||||
if [ -f /notinstalled ]; then exit 0; fi
|
||||
|
||||
|
||||
Binary file not shown.
|
Before Width: | Height: | Size: 1.8 KiB After Width: | Height: | Size: 1.8 KiB |
Reference in New Issue
Block a user