Skip to content

Commit f8d5d68

Browse files
authored
Merge branch 'main' into migrate-pecl-to-os-packages
2 parents fdce2f7 + d45498b commit f8d5d68

File tree

4 files changed

+28
-14
lines changed

4 files changed

+28
-14
lines changed

lib.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -2318,17 +2318,24 @@ fi
23182318
# Clone or refresh local backup of repository
23192319
# This runs during update to keep a fresh copy as fallback
23202320
ensure_local_backup_repo() {
2321-
local BACKUP_REPO="/var/scripts/vm-repo-backup"
2321+
local BACKUP_REPO="$SCRIPTS/vm-repo-backup"
23222322

2323-
# Install git if needed
2323+
# Check if we can reach GitHub before deleting existing backup
2324+
if ! site_200 github.com
2325+
then
2326+
print_text_in_color "$IYellow" "Cannot reach GitHub - keeping existing local backup"
2327+
return 1
2328+
fi
2329+
2330+
# Install git if needed (after confirming we have internet)
23242331
install_if_not git
23252332

23262333
# Remove old clone and get fresh copy
23272334
print_text_in_color "$ICyan" "Creating local backup of repository (in case of network issues)..."
23282335
rm -rf "$BACKUP_REPO"
23292336

2330-
# Clone with timeout, don't fail if it doesn't work
2331-
if timeout 120 git clone --depth 1 --branch main \
2337+
# Clone repository
2338+
if git clone --depth 1 --branch main \
23322339
https://github.com/nextcloud/vm.git "$BACKUP_REPO" &>/dev/null
23332340
then
23342341
chmod -R +rx "$BACKUP_REPO"
@@ -2346,7 +2353,7 @@ try_local_backup() {
23462353
local url="$1"
23472354
local file="$2"
23482355
local dest_dir="$3"
2349-
local BACKUP_REPO="/var/scripts/vm-repo-backup"
2356+
local BACKUP_REPO="$SCRIPTS/vm-repo-backup"
23502357

23512358
# Check if backup exists
23522359
if [ ! -d "$BACKUP_REPO" ]

menu/additional_apps.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -46,7 +46,7 @@ $CHECKLIST_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
4646
"Webmin" "(Server GUI like Cpanel)" OFF \
4747
"Talk" "(Video calls and chat for Nextcloud - requires port 3478)" "$STARTUP_SWITCH" \
4848
"SMB-mount" "(Mount SMB-shares from your local network)" OFF \
49-
"Adminer" "(PostgreSQL GUI)" OFF \
49+
"AdminNeo" "(PostgreSQL GUI)" OFF \
5050
"LDAP" "(Windows Active directory for Nextcloud)" OFF \
5151
"Notify Push" "(High Performance Files Backend for Nextcloud)" OFF \
5252
"Netdata" "(Real-time server monitoring in Web GUI)" OFF \
@@ -71,8 +71,8 @@ case "$choice" in
7171
print_text_in_color "$ICyan" "Downloading the Fail2ban Menu..."
7272
run_script MENU fail2ban_menu
7373
;;&
74-
*"Adminer"*)
75-
print_text_in_color "$ICyan" "Downloading the Adminer script..."
74+
*"AdminNeo"*)
75+
print_text_in_color "$ICyan" "Downloading the AdminNeo script..."
7676
run_script APP adminer
7777
;;&
7878
*"ClamAV"*)

network/ddclient-configuration.sh

Lines changed: 12 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -43,6 +43,8 @@ fi
4343

4444
# Install curl for ddclient to work around 3.10.0 parsing bug (see #2754)
4545
install_if_not curl
46+
# Also ensure curl is installed before ddclient installation
47+
apt-get install curl -y
4648
DEBIAN_FRONTEND=noninteractive apt-get install ddclient -y
4749

4850
# Test if file exists
@@ -76,6 +78,7 @@ case "$choice" in
7678
PROTOCOL="cloudflare"
7779
SERVER="www.cloudflare.com"
7880
USE_SSL="yes"
81+
USE_ZONE="yes"
7982
;;
8083
"deSEC")
8184
PROVIDER="deSEC"
@@ -179,10 +182,10 @@ cat << DDCLIENT_CONF > "/etc/ddclient.conf"
179182
# /etc/ddclient.conf
180183
181184
# Default system settings
182-
use=if, if=$IFACE
183185
use=web, web=https://api.ipify.org
184186
185-
# Work around ddclient 3.10.0+ parsing bug by using curl
187+
# Workaround for ddclient 3.10.0+ parsing bug disabled
188+
# The 'curl=yes' option causes "curl not found" errors even with curl installed
186189
# See: https://github.com/ddclient/ddclient/issues/499
187190
# and: https://github.com/nextcloud/vm/issues/2754
188191
# curl=yes
@@ -198,18 +201,22 @@ login=$LOGIN
198201
password=$PASSWORD
199202
200203
# Hostname follows:
201-
zone=$HOSTNAME
202-
$HOSTNAME
203204
DDCLIENT_CONF
204205

206+
if [ "$USE_ZONE" = "yes" ]
207+
then
208+
echo "zone=$HOSTNAME" >> /etc/ddclient.conf
209+
fi
210+
echo "$HOSTNAME" >> /etc/ddclient.conf
211+
205212
# Test connection
206213
msg_box "Everything is set up by now and we will check the connection."
207214
if ! ddclient -verbose
208215
then
209216
msg_box "Something failed while testing the DDNS update.
210217
Please try again by running this script again!"
218+
exit 1
211219
else
212220
msg_box "Congratulations, it seems like the initial DDNS update worked!
213221
DDclient is now set up correctly!"
214222
fi
215-
exit

nextcloud_install_production.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -116,7 +116,7 @@ Enabling this will also force an automatic reboot after running the update scrip
116116
print_text_in_color "$ICyan" "Creating volume..."
117117
sleep 1
118118
# Create a placeholder snapshot
119-
check_command lvcreate --size 10G --name "NcVM-installation" ubuntu-vg
119+
check_command lvcreate --size 5G --name "NcVM-installation" ubuntu-vg
120120
export SNAPSHOTS_ENABLED="yes"
121121
else
122122
print_text_in_color "$IRed" "Could not create volume because of insufficient space..."

0 commit comments

Comments
 (0)