1
0
mirror of https://github.com/tteck/Proxmox.git synced 2024-12-22 01:46:48 +02:00

Update alpine-nextcloud.sh

Remove "update" option
fixes https://github.com/tteck/Proxmox/issues/3298
This commit is contained in:
tteckster 2024-06-30 09:09:08 -04:00 committed by GitHub
parent 1769a3f40b
commit 8fd1727fa8
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -60,12 +60,10 @@ function update_script() {
if ! apk -e info newt >/dev/null 2>&1; then
apk add -q newt
fi
RELEASE=$(curl -s https://api.github.com/repos/nextcloud/server/releases/latest | grep "tag_name" | awk '{print substr($2, 2, length($2)-3) }')
while true; do
CHOICE=$(whiptail --backtitle "Proxmox VE Helper Scripts" --title "SUPPORT" --radiolist --cancel-button Exit-Script "Spacebar = Select" 11 58 3 \
"1" "Update Nextcloud to $RELEASE" OFF \
"2" "Nextcloud Login Credentials" ON \
"3" "Renew Self-signed Certificate" OFF \
"1" "Nextcloud Login Credentials" ON \
"2" "Renew Self-signed Certificate" OFF \
3>&1 1>&2 2>&3)
exit_status=$?
if [ $exit_status == 1 ]; then
@ -75,22 +73,10 @@ function update_script() {
header_info
case $CHOICE in
1)
apk update && apk upgrade
if ! apk -e info php82-sodium >/dev/null 2>&1; then
apk add -q php82-sodium
fi
if ! apk -e info php82-bz2 >/dev/null 2>&1; then
apk add -q php82-bz2
fi
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ upgrade'
su nextcloud -s /bin/sh -c 'php82 /usr/share/webapps/nextcloud/occ db:add-missing-indices'
exit
;;
2)
cat nextcloud.creds
exit
;;
3)
2)
openssl req -x509 -nodes -days 365 -newkey rsa:4096 -keyout /etc/ssl/private/nextcloud-selfsigned.key -out /etc/ssl/certs/nextcloud-selfsigned.crt -subj "/C=US/O=Nextcloud/OU=Domain Control Validated/CN=nextcloud.local" > /dev/null 2>&1
rc-service nginx restart
exit