Merge branch 'master' into desec-apps

This commit is contained in:
Daniel Hansson 2023-04-08 19:50:50 +02:00 committed by GitHub
commit 3792d1d6d7
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
7 changed files with 55 additions and 21 deletions

View File

@ -10,6 +10,12 @@ PR's are more than welcome. Happy Nextclouding!
### Different versions
If you run Hyper-V or want 500 GB, 1 TB or 2 TB VM you can download it from [T&M Hansson IT's shop](https://shop.hanssonit.se/product-category/virtual-machine/nextcloud/).
## 26.0.0
### Full changelog:
- [VM](https://github.com/nextcloud/vm/releases/tag/26.0.0)
- [Nextcloud](https://nextcloud.com/changelog/#latest26)
## 25.0.2
### Small changelog:

View File

@ -4,8 +4,8 @@
true
SCRIPT_NAME="Nextcloud Talk"
SCRIPT_EXPLAINER="This script installs Nextcloud Talk and also offers the possibility \
to install the so-called High-Performance-Backend, which makes it possible to host more video calls than it would be with the standard Talk app. \
SCRIPT_EXPLAINER="This script installs Nextcloud Talk whcih is a replacement for Teams/Skype and similar.\
You will also be offered the possibility to install the so-called High-Performance-Backend, which makes it possible to host more video calls than it would be with the standard Talk app. \
It's called 'Talk Signaling' and you will be offered to install it as part two of this script."
# shellcheck source=lib.sh
source /var/scripts/fetch_lib.sh

16
lib.sh
View File

@ -761,19 +761,31 @@ fi
check_nextcloud_https() {
if ! nextcloud_occ_no_check config:system:get overwrite.cli.url | grep -q "https"
then
msg_box "Sorry, but Nextcloud needs to be run on HTTPS.
if [ "$1" == 'Collabora (Docker)' ] || [ "$1" == 'OnlyOffice (Docker)' ]
then
msg_box "Sorry, but Nextcloud needs to be run on HTTPS.
You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
More info here: https://bit.ly/37wRCin
To run this script again, just exectue 'sudo bash $SCRIPTS/menu.sh' and choose:
Additional Apps --> Documentserver --> $1."
exit
exit
else
msg_box "Sorry, but Nextcloud needs to be run on HTTPS.
You can easily activate TLS (HTTPS) by running the Let's Encrypt script.
More info here: https://bit.ly/37wRCin
To run this script again, just exectue 'sudo bash $SCRIPTS/menu.sh' and choose:
Additional Apps --> $1."
exit
fi
fi
}
restart_webserver() {
# https://github.com/nextcloud/vm/issues/2358
sleep 2
print_text_in_color "$ICyan" "Restarting Apache2 and PHP-FPM..."
check_command systemctl restart apache2.service
check_php
if is_this_installed php"$PHPVER"-fpm

View File

@ -39,10 +39,10 @@ choice=$(whiptail --title "$TITLE" --checklist \
"Which apps do you want to install?\n\nAutomatically configure and install selected apps
$CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
"Documentserver" "(OnlyOffice or Collabora - Docker or Integrated)" OFF \
"Bitwarden" "(External password manager)" OFF \
"Bitwarden" "(External password manager) [4GB RAM]" OFF \
"Fail2ban " "(Extra Bruteforce protection)" "$STARTUP_SWITCH" \
"Recognize" "(Use [local] AI on your photos in Nextcloud)" OFF \
"Imaginary" "(Generate image previews for Nextcloud) [4GB RAM + 4 CPU]" "OFF" \
"Recognize" "(Use [local] AI on your photos in Nextcloud) [8GB RAM]" OFF \
"Imaginary" "(Generate image previews for Nextcloud) [4GB RAM]" "$STARTUP_SWITCH" \
"Webmin" "(Server GUI like Cpanel)" OFF \
"Talk" "(Video calls and chat for Nextcloud - requires port 3478)" "$STARTUP_SWITCH" \
"SMB-mount" "(Mount SMB-shares from your local network)" OFF \

View File

@ -369,7 +369,7 @@ else
then
msg_box "The new password for the current CLI user in Ubuntu ($UNIXUSER) is now set to: $UNIX_PASSWORD
This is used when you login to the Ubuntu CLI."
This is used when you login to the Ubuntu CLI."
fi
fi
unset UNIX_PASSWORD

View File

@ -920,7 +920,6 @@ $CHECKLIST_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
"Deck" "" ON \
"Collectives" "" ON \
"Suspicios Login detetion" "" ON \
"Imaginary" "" ON \
"IssueTemplate" "" OFF \
"Group-Folders" "" OFF 3>&1 1>&2 2>&3)
fi
@ -965,9 +964,6 @@ case "$choice" in
*"Suspicios Login detetion"*)
install_and_enable_app suspicios_login
;;&
*"Imaginary"*)
run_script APP imaginary
;;&
*"Group-Folders"*)
install_and_enable_app groupfolders
;;&

View File

@ -35,10 +35,10 @@ is_process_running dpkg
# Automatically restart services (Ubuntu 22.04)
if ! version 16.04.10 "$DISTRO" 20.04.10
then
if ! grep -r "{restart} = 'a'" /etc/needrestart/needrestart.conf
if ! grep -rq "{restart} = 'a'" /etc/needrestart/needrestart.conf
then
# Restart mode: (l)ist only, (i)nteractive or (a)utomatically.
sed -i "s|#\$nrconf{restart} = .*|\$nrconf{restart} = 'a';|g" /etc/needrestart/needrestart.conf
sed -i "s|#\$nrconf{restart} =.*|\$nrconf{restart} = 'a'\;|g" /etc/needrestart/needrestart.conf
fi
fi
@ -906,15 +906,35 @@ fi
if is_this_installed postgresql-common
then
cd /tmp
if sudo -u postgres psql -c "SELECT 1 AS result FROM pg_database WHERE datname='$NCDB'" | grep "1 row" > /dev/null
# Test connection to PostgreSQL
if ! sudo -u postgres psql -c "\q"
then
print_text_in_color "$ICyan" "Doing pgdump of $NCDB..."
check_command sudo -u postgres pg_dump -Fc "$NCDB" > "$BACKUP"/nextclouddb.dump
# Import:
# sudo -u postgres pg_restore --verbose --clean --no-acl --no-owner -h localhost -U ncadmin -d nextcloud_db "$BACKUP"/nextclouddb.dump
# If it fails, trust the 'postgres' user to be able to perform backup
rsync -a /etc/postgresql/*/main/pg_hba.conf "$BACKUP"/pg_hba.conf_BACKUP
sed -i "s|local all postgres .*|local all postgres trust|g" /etc/postgresql/*/main/pg_hba.conf
systemctl restart postgresql.service
if sudo -u postgres psql -c "SELECT 1 AS result FROM pg_database WHERE datname='$NCDB'" | grep "1 row" > /dev/null
then
print_text_in_color "$ICyan" "Doing pgdump of $NCDB..."
check_command sudo -u postgres pg_dump -Fc "$NCDB" > "$BACKUP"/nextclouddb.dump
# Import:
# sudo -u postgres pg_restore --verbose --clean --no-acl --no-owner -h localhost -U ncadmin -d nextcloud_db "$BACKUP"/nextclouddb.dump
else
print_text_in_color "$ICyan" "Doing pgdump of all databases..."
check_command sudo -u postgres pg_dumpall > "$BACKUP"/alldatabases.dump
fi
else
print_text_in_color "$ICyan" "Doing pgdump of all databases..."
check_command sudo -u postgres pg_dumpall > "$BACKUP"/alldatabases.dump
# If there's no issues, then continue as normal
if sudo -u postgres psql -c "SELECT 1 AS result FROM pg_database WHERE datname='$NCDB'" | grep "1 row" > /dev/null
then
print_text_in_color "$ICyan" "Doing pgdump of $NCDB..."
check_command sudo -u postgres pg_dump -Fc "$NCDB" > "$BACKUP"/nextclouddb.dump
# Import:
# sudo -u postgres pg_restore --verbose --clean --no-acl --no-owner -h localhost -U ncadmin -d nextcloud_db "$BACKUP"/nextclouddb.dump
else
print_text_in_color "$ICyan" "Doing pgdump of all databases..."
check_command sudo -u postgres pg_dumpall > "$BACKUP"/alldatabases.dump
fi
fi
fi