mirror of
https://github.com/alexbelgium/hassio-addons.git
synced 2026-06-02 05:44:03 +02:00
Update
This commit is contained in:
@@ -132,14 +132,8 @@ RUN \
|
|||||||
cat /defaults/nginx_addition >> /defaults/nginx/site-confs/default.conf.sample && \
|
cat /defaults/nginx_addition >> /defaults/nginx/site-confs/default.conf.sample && \
|
||||||
\
|
\
|
||||||
# Rename smb files
|
# Rename smb files
|
||||||
mv 92-local_mounts.sh 00-local_mounts.sh && \
|
mv /etc/cont-init.d/92-local_mounts.sh /etc/cont-init.d/00-local_mounts.sh && \
|
||||||
mv 92-smb_mounts.sh 00-smb_mounts.sh
|
mv /etc/cont-init.d/92-smb_mounts.sh /etc/cont-init.d/00-smb_mounts.sh
|
||||||
|
|
||||||
#RUN chmod 777 /entrypoint.sh
|
|
||||||
#WORKDIR /
|
|
||||||
#ENTRYPOINT [ "/usr/bin/env" ]
|
|
||||||
#CMD [ "/entrypoint.sh" ]
|
|
||||||
#SHELL ["/bin/bash", "-o", "pipefail", "-c"]
|
|
||||||
|
|
||||||
############
|
############
|
||||||
# 5 Labels #
|
# 5 Labels #
|
||||||
|
|||||||
@@ -106,6 +106,6 @@
|
|||||||
"slug": "nextcloud_ocr",
|
"slug": "nextcloud_ocr",
|
||||||
"uart": true,
|
"uart": true,
|
||||||
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud",
|
"url": "https://github.com/alexbelgium/hassio-addons/tree/master/nextcloud",
|
||||||
"version": "26.0.0-4",
|
"version": "26.0.0-5_updater",
|
||||||
"webui": "https://[HOST]:[PORT:443]"
|
"webui": "https://[HOST]:[PORT:443]"
|
||||||
}
|
}
|
||||||
@@ -20,8 +20,10 @@ function version { echo "$@" | awk -F. '{ printf("%d%03d%03d%03d\n", $1,$2,$3,$4
|
|||||||
# Updater code
|
# Updater code
|
||||||
if ! bashio::config.true "disable_updates"; then
|
if ! bashio::config.true "disable_updates"; then
|
||||||
bashio::log.green "Auto_updater set, checking for updates"
|
bashio::log.green "Auto_updater set, checking for updates"
|
||||||
|
# Install new version
|
||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/updater/updater.phar --no-interaction"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/updater/updater.phar --no-interaction"
|
||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
||||||
|
# Install additional versions
|
||||||
while [[ $(occ update:check 2>&1) == *"update available"* ]]; do
|
while [[ $(occ update:check 2>&1) == *"update available"* ]]; do
|
||||||
bashio::log.yellow "-----------------------------------------------------------------------"
|
bashio::log.yellow "-----------------------------------------------------------------------"
|
||||||
bashio::log.yellow " new version available, updating. Please do not turn off your addon! "
|
bashio::log.yellow " new version available, updating. Please do not turn off your addon! "
|
||||||
@@ -29,14 +31,10 @@ if ! bashio::config.true "disable_updates"; then
|
|||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/updater/updater.phar --no-interaction"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/updater/updater.phar --no-interaction"
|
||||||
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
sudo -u abc -s /bin/bash -c "php /data/config/www/nextcloud/occ upgrade"
|
||||||
done
|
done
|
||||||
|
# Reset permissions
|
||||||
|
/./01-folders.sh
|
||||||
elif bashio::config.true "disable_updates" && [ "$(version "$CONTAINERVERSION")" -gt "$(version "$CURRENTVERSION")" ]; then
|
elif bashio::config.true "disable_updates" && [ "$(version "$CONTAINERVERSION")" -gt "$(version "$CURRENTVERSION")" ]; then
|
||||||
bashio::log.yellow " "
|
bashio::log.yellow " "
|
||||||
bashio::log.yellow "New version available : $CONTAINERVERSION"
|
bashio::log.yellow "New version available : $CONTAINERVERSION"
|
||||||
bashio::log.yellow "...auto_updater not set in addon options, please update from nextcloud settings"
|
bashio::log.yellow "...auto_updater not set in addon options, please update from nextcloud settings"
|
||||||
fi
|
fi
|
||||||
|
|
||||||
#####################
|
|
||||||
# RESET PERMISSIONS #
|
|
||||||
#####################
|
|
||||||
|
|
||||||
/./01-folders.sh
|
|
||||||
|
|||||||
Reference in New Issue
Block a user