mirror of
https://github.com/nextcloud/nextcloudpi.git
synced 2026-01-10 15:12:01 -03:30
commit
eb835b9c12
@ -8,7 +8,10 @@ source /usr/local/etc/library.sh # sets NCLATESTVER
|
|||||||
|
|
||||||
CURRENT="$(nc_version)"
|
CURRENT="$(nc_version)"
|
||||||
NEXT_VERSION="$(determine_nc_update_version "${CURRENT}" "${NCLATESTVER?}")"
|
NEXT_VERSION="$(determine_nc_update_version "${CURRENT}" "${NCLATESTVER?}")"
|
||||||
[[ -n "$NEXT_VERSION" ]] || exit 0
|
if [[ -z "$NEXT_VERSION" ]] || [[ "$NEXT_VERSION" == "${CURRENT}" ]]
|
||||||
|
then
|
||||||
|
exit 0
|
||||||
|
fi
|
||||||
|
|
||||||
NOTIFIED=/var/run/.nc-version-notified
|
NOTIFIED=/var/run/.nc-version-notified
|
||||||
|
|
||||||
|
|||||||
@ -26,19 +26,19 @@ VER="$1"
|
|||||||
connect_to_nc_update() {
|
connect_to_nc_update() {
|
||||||
tail -n 100 -f "/var/log/ncp-update-nc.log" &
|
tail -n 100 -f "/var/log/ncp-update-nc.log" &
|
||||||
tail_pid=$!
|
tail_pid=$!
|
||||||
|
trap "kill '$tail_pid'" EXIT
|
||||||
while [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|activating|deactivating)$ ]]
|
while [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|activating|deactivating)$ ]]
|
||||||
do
|
do
|
||||||
sleep 3
|
sleep 3
|
||||||
done
|
done
|
||||||
|
|
||||||
kill "$tail_pid"
|
|
||||||
if [[ "$(systemctl is-active ncp-update-nc ||:)" == "inactive" ]]
|
if [[ "$(systemctl is-active ncp-update-nc ||:)" == "inactive" ]]
|
||||||
then
|
then
|
||||||
echo "Nextcloud update finished successfully."
|
echo "Nextcloud update finished successfully."
|
||||||
return 0
|
return 0
|
||||||
elif [[ "$(systemctl is-active ncp-update-nc ||:)" == "failed" ]]
|
elif [[ "$(systemctl is-active ncp-update-nc ||:)" == "failed" ]]
|
||||||
then
|
then
|
||||||
echo "Nextcloud update failed."
|
echo "Nextcloud update failed (or was installed already)."
|
||||||
return 1
|
return 1
|
||||||
else
|
else
|
||||||
echo "Nextcloud update was not found or failed (unexpected status: '$(systemctl is-active ncp-update-nc ||:)')"
|
echo "Nextcloud update was not found or failed (unexpected status: '$(systemctl is-active ncp-update-nc ||:)')"
|
||||||
@ -52,15 +52,16 @@ then
|
|||||||
exit $?
|
exit $?
|
||||||
fi
|
fi
|
||||||
|
|
||||||
systemctl reset-failed ncp-encrypt ||:
|
systemctl reset-failed ncp-encrypt 2>/dev/null ||:
|
||||||
systemd-run -u 'ncp-update-nc' bash -c "DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
|
systemd-run -u 'ncp-update-nc' bash -c "set -o pipefail; DBG='${DBG:-}' /usr/local/bin/ncp-update-nc.d/update-nc.sh '${VER}' |& tee /var/log/ncp-update-nc.log"
|
||||||
sleep 5
|
sleep 1
|
||||||
|
|
||||||
if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|inactive|activating|deactivating)$ ]]
|
if ! [[ "$(systemctl is-active ncp-update-nc ||:)" =~ ^(active|inactive|activating|deactivating)$ ]]
|
||||||
then
|
then
|
||||||
echo "Failed to start ncp-update-nc"
|
echo "Failed to start ncp-update-nc"
|
||||||
[[ -f /var/log/ncp-update-nc.log ]] && cat /var/log/ncp-update-nc.log
|
[[ -f /var/log/ncp-update-nc.log ]] && cat /var/log/ncp-update-nc.log
|
||||||
systemctl status --no-pager ncp-update-nc ||:
|
systemctl status --no-pager ncp-update-nc ||:
|
||||||
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
connect_to_nc_update
|
connect_to_nc_update
|
||||||
|
|||||||
@ -31,7 +31,7 @@ fi
|
|||||||
TARGET_VERSION="$(determine_nc_update_version "${CURRENT?}" "${NCLATESTVER}" "${REQUESTED_VERSION}")"
|
TARGET_VERSION="$(determine_nc_update_version "${CURRENT?}" "${NCLATESTVER}" "${REQUESTED_VERSION}")"
|
||||||
[[ "$TARGET_VERSION" == "$CURRENT" ]] && {
|
[[ "$TARGET_VERSION" == "$CURRENT" ]] && {
|
||||||
echo "Nextcloud version ${CURRENT} is already installed. Nothing to do."
|
echo "Nextcloud version ${CURRENT} is already installed. Nothing to do."
|
||||||
exit 0
|
exit 1
|
||||||
}
|
}
|
||||||
[[ -n "$TARGET_VERSION" ]] || {
|
[[ -n "$TARGET_VERSION" ]] || {
|
||||||
echo "Could not find a valid upgrade path from '${CURRENT}' to '${TARGET_VERSION}'. Nothing to update."
|
echo "Could not find a valid upgrade path from '${CURRENT}' to '${TARGET_VERSION}'. Nothing to update."
|
||||||
|
|||||||
@ -58,7 +58,7 @@ configure()
|
|||||||
export PASSWORD
|
export PASSWORD
|
||||||
# Just mount already encrypted data
|
# Just mount already encrypted data
|
||||||
if [[ -f "${encdir?}"/gocryptfs.conf ]]; then
|
if [[ -f "${encdir?}"/gocryptfs.conf ]]; then
|
||||||
systemctl reset-failed ncp-encrypt ||:
|
systemctl reset-failed ncp-encrypt 2>/dev/null ||:
|
||||||
systemd-run -u ncp-encrypt -E PASSWORD bash -c "gocryptfs -fg -allow_other -q '${encdir}' '${datadir}' <<<\"\${PASSWORD}\" 2>&1 | sed /^Switch/d |& tee /var/log/ncp-encrypt.log"
|
systemd-run -u ncp-encrypt -E PASSWORD bash -c "gocryptfs -fg -allow_other -q '${encdir}' '${datadir}' <<<\"\${PASSWORD}\" 2>&1 | sed /^Switch/d |& tee /var/log/ncp-encrypt.log"
|
||||||
|
|
||||||
# switch to the regular virtual hosts after we decrypt, so we can access NC and ncp-web
|
# switch to the regular virtual hosts after we decrypt, so we can access NC and ncp-web
|
||||||
@ -88,7 +88,7 @@ configure()
|
|||||||
mv "${datadir?}" "${tmpdir?}"
|
mv "${datadir?}" "${tmpdir?}"
|
||||||
|
|
||||||
mkdir "${datadir}"
|
mkdir "${datadir}"
|
||||||
systemctl reset-failed ncp-encrypt ||:
|
systemctl reset-failed ncp-encrypt 2>/dev/null ||:
|
||||||
systemd-run -u ncp-encrypt -E PASSWORD bash -c "gocryptfs -fg -allow_other -q '${encdir}' '${datadir}' <<<\"\${PASSWORD}\" 2>&1 | sed /^Switch/d |& tee /var/log/ncp-encrypt.log"
|
systemd-run -u ncp-encrypt -E PASSWORD bash -c "gocryptfs -fg -allow_other -q '${encdir}' '${datadir}' <<<\"\${PASSWORD}\" 2>&1 | sed /^Switch/d |& tee /var/log/ncp-encrypt.log"
|
||||||
|
|
||||||
maxtries=5
|
maxtries=5
|
||||||
|
|||||||
@ -23,7 +23,7 @@ configure()
|
|||||||
source /usr/local/etc/library.sh
|
source /usr/local/etc/library.sh
|
||||||
|
|
||||||
echo -e "[ncp-update-nc]" >> /var/log/ncp.log
|
echo -e "[ncp-update-nc]" >> /var/log/ncp.log
|
||||||
/usr/local/bin/ncp-update-nc "$NCLATESTVER" 2>&1 | tee -a /var/log/ncp.log
|
/usr/local/bin/ncp-update-nc "latest" 2>&1 | tee -a /var/log/ncp.log
|
||||||
|
|
||||||
if [[ \${PIPESTATUS[0]} -eq 0 ]]; then
|
if [[ \${PIPESTATUS[0]} -eq 0 ]]; then
|
||||||
|
|
||||||
|
|||||||
@ -1,5 +1,12 @@
|
|||||||
# NextcloudPi Changelog
|
# NextcloudPi Changelog
|
||||||
|
|
||||||
|
## [v1.55.2](https://github.com/nextcloud/nextcloudpi/tree/v1.55.2) (2024-09-24) Hotfix release
|
||||||
|
|
||||||
|
### Fixes
|
||||||
|
|
||||||
|
- Increase the maximum package size for mysqldump to 256M (fixes [#1979](https://github.com/nextcloud/nextcloudpi/issues/1979))
|
||||||
|
- Fix repeated erroneous update success messages for auto updates (fixes [#1979](https://github.com/nextcloud/nextcloudpi/issues/1979), [#1981](https://github.com/nextcloud/nextcloudpi/issues/1981))
|
||||||
|
|
||||||
## [v1.55.1](https://github.com/nextcloud/nextcloudpi/tree/v1.55.1) (2024-09-08) Hotfix release
|
## [v1.55.1](https://github.com/nextcloud/nextcloudpi/tree/v1.55.1) (2024-09-08) Hotfix release
|
||||||
|
|
||||||
### Fixes
|
### Fixes
|
||||||
|
|||||||
@ -19,6 +19,9 @@ innodb_file_per_table=1
|
|||||||
innodb_file_format=barracuda
|
innodb_file_format=barracuda
|
||||||
max_allowed_packet=256M
|
max_allowed_packet=256M
|
||||||
|
|
||||||
|
[mysqldump]
|
||||||
|
max_allowed_packet = 256M
|
||||||
|
|
||||||
[server]
|
[server]
|
||||||
# innodb settings
|
# innodb settings
|
||||||
skip-name-resolve
|
skip-name-resolve
|
||||||
|
|||||||
50
staged_rollouts/v1.55.2.txt
Normal file
50
staged_rollouts/v1.55.2.txt
Normal file
@ -0,0 +1,50 @@
|
|||||||
|
0
|
||||||
|
1
|
||||||
|
2
|
||||||
|
3
|
||||||
|
4
|
||||||
|
5
|
||||||
|
6
|
||||||
|
9
|
||||||
|
10
|
||||||
|
13
|
||||||
|
15
|
||||||
|
26
|
||||||
|
29
|
||||||
|
30
|
||||||
|
32
|
||||||
|
33
|
||||||
|
34
|
||||||
|
35
|
||||||
|
36
|
||||||
|
37
|
||||||
|
38
|
||||||
|
39
|
||||||
|
40
|
||||||
|
41
|
||||||
|
42
|
||||||
|
43
|
||||||
|
44
|
||||||
|
45
|
||||||
|
46
|
||||||
|
47
|
||||||
|
48
|
||||||
|
51
|
||||||
|
54
|
||||||
|
55
|
||||||
|
59
|
||||||
|
60
|
||||||
|
62
|
||||||
|
63
|
||||||
|
64
|
||||||
|
68
|
||||||
|
69
|
||||||
|
70
|
||||||
|
73
|
||||||
|
74
|
||||||
|
75
|
||||||
|
76
|
||||||
|
84
|
||||||
|
89
|
||||||
|
92
|
||||||
|
96
|
||||||
9
updates/1.55.2.sh
Normal file
9
updates/1.55.2.sh
Normal file
@ -0,0 +1,9 @@
|
|||||||
|
#!/bin/bash
|
||||||
|
set -e
|
||||||
|
|
||||||
|
source /usr/local/etc/library.sh
|
||||||
|
|
||||||
|
run_app nc-autoupdate-nc
|
||||||
|
|
||||||
|
install_template "mysql/91-ncp.cnf.sh" "/etc/mysql/mariadb.conf.d/91-ncp.cnf"
|
||||||
|
service mariadb reload
|
||||||
Loading…
x
Reference in New Issue
Block a user