Skip to content

Commit 2413b07

Browse files
committed
Fix spelling errors and improve AdminNeo version handling
Spelling fixes: - Fix NCUSER -> NCDBUSER typo in nextcloud_update.sh (lines 101, 102, 107) - Fix 'recomended' -> 'recommended' in apps/imaginary.sh - Fix 'usally' -> 'usually' in apps/talk.sh - Fix 'recomend' -> 'recommend' in menu/documentserver.sh - Fix 'Improvments' -> 'Improvements' in torrent/create.sh AdminNeo improvements: - Move ADMINER_VERSION and ADMINER_DOWNLOAD_URL to lib.sh - Add dynamic version detection via GitHub API - Automatically fetch latest AdminNeo version with fallback to 5.1.1 - Remove hardcoded version from apps/adminer.sh
1 parent e683db5 commit 2413b07

7 files changed

Lines changed: 23 additions & 10 deletions

File tree

apps/adminer.sh

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -57,9 +57,6 @@ install_if_not adminer
5757

5858
# AdminerEvo project has been archived, switching to AdminNeo (www.adminneo.org)
5959
# See: https://github.com/adminneo-org/adminneo
60-
ADMINER_VERSION="5.1.1"
61-
ADMINER_DOWNLOAD_URL="https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/adminneo-${ADMINER_VERSION}.php"
62-
6360
print_text_in_color "$ICyan" "Downloading AdminNeo version ${ADMINER_VERSION}..."
6461
if ! curl_to_dir "https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/" "adminneo-${ADMINER_VERSION}.php" "$ADMINERDIR"
6562
then

apps/imaginary.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -21,7 +21,7 @@ debug_mode
2121
root_check
2222

2323
# Check recources
24-
# If we can calculate the cpu and ram, then set it to the lowest possible, if not, then hardcode it to a recomended minimum.
24+
# If we can calculate the cpu and ram, then set it to the lowest possible, if not, then hardcode it to a recommended minimum.
2525
if which nproc >/dev/null 2>&1
2626
then
2727
ram_check 2 Imaginary

apps/talk.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -247,7 +247,7 @@ https://gitlab.com/packaging/nextcloud-spreed-signaling
247247
https://gitlab.com/packaging/janus/"
248248

249249
# Ask the user if he/she wants the HPB server as well
250-
if ! yesno_box_no "Do you want to install the $SCRIPT_NAME? Please note that using basic Talk is usally enough."
250+
if ! yesno_box_no "Do you want to install the $SCRIPT_NAME? Please note that using basic Talk is usually enough."
251251
then
252252
exit 1
253253
fi

lib.sh

Lines changed: 16 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -169,6 +169,22 @@ NOTIFY_PUSH_SERVICE_PATH="/etc/systemd/system/notify_push.service"
169169
ADMINERDIR=/usr/share/adminer
170170
ADMINER_CONF="$SITES_AVAILABLE/adminer.conf"
171171
ADMINER_CONF_PLUGIN="$ADMINERDIR/extra_plugins.php"
172+
# Get latest AdminNeo version dynamically from GitHub releases
173+
get_adminneo_version() {
174+
local version
175+
version=$(curl -s -m 30 "https://api.github.com/repos/adminneo-org/adminneo/releases/latest" | grep -oP '"tag_name":\s*"v\K[^"]+')
176+
177+
# Validate version format (X.X.X)
178+
if echo "$version" | grep -qE '^[0-9]+\.[0-9]+\.[0-9]+$'
179+
then
180+
echo "$version"
181+
else
182+
# Fallback to known stable version
183+
echo "5.1.1"
184+
fi
185+
}
186+
ADMINER_VERSION=$(get_adminneo_version)
187+
ADMINER_DOWNLOAD_URL="https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/adminneo-${ADMINER_VERSION}.php"
172188
# Redis
173189
REDIS_CONF=/etc/redis/redis.conf
174190
REDIS_SOCK=/var/run/redis/redis-server.sock

menu/documentserver.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -17,7 +17,7 @@ debug_mode
1717
root_check
1818

1919
choice=$(whiptail --title "$TITLE" --menu \
20-
"Which Documentserver for online editing do you want to install?\n\nWe recomend Collabora with Docker. The subdomain could look like this:\noffice.your-nextcloud.tld\n\nAutomatically configure and install the selected Documentserver.
20+
"Which Documentserver for online editing do you want to install?\n\nWe recommend Collabora with Docker. The subdomain could look like this:\noffice.your-nextcloud.tld\n\nAutomatically configure and install the selected Documentserver.
2121
$MENU_GUIDE\n\n$RUN_LATER_GUIDE" "$WT_HEIGHT" "$WT_WIDTH" 4 \
2222
"Collabora (Docker)" "(Extra Subdomain required)" \
2323
"Collabora (Integrated)" "(No Subdomain required)" \

nextcloud_update.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -98,16 +98,16 @@ then
9898

9999
# Apply the fix
100100
if sudo -u postgres psql -d "$NCDB" <<END
101-
GRANT CREATE ON SCHEMA public TO $NCUSER;
102-
GRANT ALL ON SCHEMA public TO $NCUSER;
101+
GRANT CREATE ON SCHEMA public TO $NCDBUSER;
102+
GRANT ALL ON SCHEMA public TO $NCDBUSER;
103103
END
104104
then
105105
print_text_in_color "$IGreen" "PostgreSQL schema permissions updated successfully!"
106106
else
107107
print_text_in_color "$IYellow" "Warning: Could not update PostgreSQL schema permissions."
108108
print_text_in_color "$IYellow" "This may cause issues with Nextcloud 30+ upgrades."
109109
print_text_in_color "$ICyan" "You can try to fix this manually by running:"
110-
print_text_in_color "$ICyan" "sudo -u postgres psql -d $NCDB -c 'GRANT CREATE ON SCHEMA public TO $NCUSER;'"
110+
print_text_in_color "$ICyan" "sudo -u postgres psql -d $NCDB -c 'GRANT CREATE ON SCHEMA public TO $NCDBUSER;'"
111111
fi
112112
fi
113113
fi

torrent/create.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,7 @@
77
#########
88

99
## This script will install Transmission, download the latest version of the VM, create a torrent of the file and seed it using Transmission
10-
## Improvments to the script are welcome!
10+
## Improvements to the script are welcome!
1111

1212
# shellcheck source=lib.sh
1313
# shellcheck disable=SC2046

0 commit comments

Comments
 (0)