Skip to content

Commit bbcb8e8

Browse files
committed
replace old adminer references
Signed-off-by: enoch85 <[email protected]>
1 parent bac45cf commit bbcb8e8

File tree

8 files changed

+86
-63
lines changed

8 files changed

+86
-63
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ Please report any issues you can find. Improvements are welcome!
7373
## First look
7474
#### Nextcloud
7575
![alt tag](https://github.com/nextcloud/nextcloud.com/blob/master/assets/img/features/VMwelcome.png)
76-
#### Adminer (Database Administration) *not default*
76+
#### AdminNeo (Database Administration) *not default*
7777
![alt tag](https://i.imgur.com/tiF4chg.png)
7878
#### Webmin (Server Administration GUI) *not default*
7979
![alt tag](https://i.imgur.com/hLkmA1D.png)

apps/adminer.sh renamed to apps/adminneo.sh

Lines changed: 47 additions & 35 deletions
Original file line numberDiff line numberDiff line change
@@ -5,7 +5,7 @@
55
true
66
SCRIPT_NAME="AdminNeo"
77
SCRIPT_EXPLAINER="AdminNeo is a full-featured database management tool written in PHP.
8-
It's a continuation of Adminer development after AdminerEvo was archived.
8+
It's a continuation of AdminNeo development after the legacy Evo fork was archived.
99
More info: https://www.adminneo.org"
1010
# shellcheck source=lib.sh
1111
source /var/scripts/fetch_lib.sh
@@ -19,8 +19,8 @@ debug_mode
1919
# Check if root
2020
root_check
2121

22-
# Check if adminer is already installed
23-
if ! is_this_installed adminer
22+
# Check if adminneo is already installed
23+
if ! is_this_installed adminneo
2424
then
2525
# Ask for installing
2626
install_popup "$SCRIPT_NAME"
@@ -29,12 +29,24 @@ else
2929
reinstall_remove_menu "$SCRIPT_NAME"
3030
# Removal
3131
check_external_ip # Check that the script can see the external IP (apache fails otherwise)
32-
a2disconf adminer.conf
33-
a2dissite adminer.conf
32+
a2disconf adminneo.conf
33+
a2dissite adminneo.conf
3434
restart_webserver
35-
rm -f $ADMINER_CONF
36-
rm -rf $ADMINERDIR
37-
check_command apt-get purge adminer -y
35+
rm -f $ADMINNEO_CONF
36+
rm -rf $ADMINNEODIR
37+
38+
# Cleanup of legacy Adminer files if they still exist
39+
if [ -f "$LEGACY_ADMINER_CONF" ] || [ -f "$LEGACY_ADMINER_CONF_ENABLED" ] || [ -d "$LEGACY_ADMINERDIR" ]
40+
then
41+
print_text_in_color "$ICyan" "Removing legacy Adminer files..."
42+
a2disconf adminer.conf >/dev/null 2>&1
43+
a2dissite adminer.conf >/dev/null 2>&1
44+
rm -f /etc/apache2/sites-available/adminer.conf
45+
rm -f /etc/apache2/sites-enabled/adminer.conf
46+
rm -rf /usr/share/adminer
47+
fi
48+
49+
check_command apt-get purge adminneo -y
3850
restart_webserver
3951
# Show successful uninstall if applicable
4052
removal_popup "$SCRIPT_NAME"
@@ -52,38 +64,38 @@ a2enmod headers
5264
a2enmod rewrite
5365
a2enmod ssl
5466

55-
# Install Adminer
67+
# Install AdminNeo
5668
apt-get update -q4 & spinner_loading
57-
install_if_not adminer
69+
install_if_not adminneo
5870

59-
# AdminerEvo project has been archived, switching to AdminNeo (www.adminneo.org)
71+
# The legacy Evo project has been archived, switching to AdminNeo (www.adminneo.org)
6072
# See: https://github.com/adminneo-org/adminneo
61-
print_text_in_color "$ICyan" "Downloading AdminNeo version ${ADMINER_VERSION}..."
62-
if ! curl_to_dir "https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/" "adminneo-${ADMINER_VERSION}.php" "$ADMINERDIR"
73+
print_text_in_color "$ICyan" "Downloading AdminNeo version ${ADMINNEO_VERSION}..."
74+
if ! curl_to_dir "https://www.adminneo.org/files/${ADMINNEO_VERSION}/pgsql_en_default/" "adminneo-${ADMINNEO_VERSION}.php" "$ADMINNEODIR"
6375
then
6476
msg_box "Failed to download AdminNeo. The download URL may have changed.
6577
6678
Please report this issue to: $ISSUES
6779
6880
Attempted to download from:
69-
$ADMINER_DOWNLOAD_URL"
81+
$ADMINNEO_DOWNLOAD_URL"
7082
exit 1
7183
fi
7284

73-
# Rename to standard adminer.php name
74-
if [ -f "$ADMINERDIR/adminneo-${ADMINER_VERSION}.php" ]
85+
# Rename to standard adminneo.php name
86+
if [ -f "$ADMINNEODIR/adminneo-${ADMINNEO_VERSION}.php" ]
7587
then
76-
mv "$ADMINERDIR/adminneo-${ADMINER_VERSION}.php" "$ADMINERDIR/adminer.php"
77-
elif [ -f "$ADMINERDIR/adminerneo-${ADMINER_VERSION}-pgsql.php" ]
88+
mv "$ADMINNEODIR/adminneo-${ADMINNEO_VERSION}.php" "$ADMINNEODIR/adminneo.php"
89+
elif [ -f "$ADMINNEODIR/adminerneo-${ADMINNEO_VERSION}-pgsql.php" ]
7890
then
7991
# Fallback for old naming if somehow still exists
80-
mv "$ADMINERDIR/adminerneo-${ADMINER_VERSION}-pgsql.php" "$ADMINERDIR/adminer.php"
92+
mv "$ADMINNEODIR/adminerneo-${ADMINNEO_VERSION}-pgsql.php" "$ADMINNEODIR/adminneo.php"
8193
else
8294
msg_box "Failed to find downloaded AdminNeo file. Please report this to $ISSUES"
8395
exit 1
8496
fi
8597

86-
print_text_in_color "$IGreen" "AdminNeo ${ADMINER_VERSION} successfully downloaded!"
98+
print_text_in_color "$IGreen" "AdminNeo ${ADMINNEO_VERSION} successfully downloaded!"
8799

88100
# Only add TLS 1.3 on Ubuntu later than 22.04
89101
if version 22.04 "$DISTRO" 24.04.10
@@ -97,7 +109,7 @@ check_php
97109
# shellcheck disable=2154
98110

99111
# Add ability to add plugins easily
100-
cat << ADMINER_CREATE_PLUGIN > "$ADMINER_CONF_PLUGIN"
112+
cat << ADMINNEO_CREATE_PLUGIN > "$ADMINNEO_CONF_PLUGIN"
101113
<?php
102114
function adminer_object() {
103115
// required to run any plugin
@@ -130,11 +142,11 @@ function adminer_object() {
130142
return new AdminerPlugin($plugins);
131143
}
132144
133-
// include original Adminer or Adminer Editor
134-
include "./adminer.php";
135-
ADMINER_CREATE_PLUGIN
145+
// include the AdminNeo runtime
146+
include "./adminneo.php";
147+
ADMINNEO_CREATE_PLUGIN
136148

137-
cat << ADMINER_CREATE > "$ADMINER_CONF"
149+
cat << ADMINNEO_CREATE > "$ADMINNEO_CONF"
138150
<VirtualHost *:80>
139151
RewriteEngine On
140152
RewriteRule ^(.*)$ https://%{HTTP_HOST}$1:9443 [R=301,L]
@@ -164,18 +176,18 @@ Listen 9443
164176
165177
### YOUR SERVER ADDRESS ###
166178
# ServerAdmin [email protected]
167-
# ServerName adminer.example.com
179+
# ServerName adminneo.example.com
168180
169181
### SETTINGS ###
170182
<FilesMatch "\.php$">
171183
SetHandler "proxy:unix:/run/php/php$PHPVER-fpm.nextcloud.sock|fcgi://localhost"
172184
</FilesMatch>
173185
174-
DocumentRoot $ADMINERDIR
186+
DocumentRoot $ADMINNEODIR
175187
176-
<Directory $ADMINERDIR>
188+
<Directory $ADMINNEODIR>
177189
<IfModule mod_dir.c>
178-
DirectoryIndex adminer.php
190+
DirectoryIndex adminneo.php
179191
</IfModule>
180192
AllowOverride All
181193
@@ -188,10 +200,10 @@ Listen 9443
188200
SSLCertificateKeyFile /etc/ssl/private/ssl-cert-snakeoil.key
189201
190202
</VirtualHost>
191-
ADMINER_CREATE
203+
ADMINNEO_CREATE
192204

193205
# Enable config
194-
check_command a2ensite adminer.conf
206+
check_command a2ensite adminneo.conf
195207

196208
if ! restart_webserver
197209
then
@@ -203,11 +215,11 @@ else
203215
check_command sed -i "s|local all postgres peer|local all postgres md5|g" /etc/postgresql/*/main/pg_hba.conf
204216
restart_webserver
205217

206-
msg_box "Adminer was successfully installed and can be reached here:
218+
msg_box "AdminNeo was successfully installed and can be reached here:
207219
https://$ADDRESS:9443
208220
209221
You can download more plugins and get more information here:
210-
https://www.adminer.org
222+
https://www.adminneo.org
211223
212224
Your PostgreSQL connection information can be found in $NCPATH/config/config.php.
213225
These are the current values:
@@ -217,6 +229,6 @@ $(grep dbuser $NCPATH/config/config.php)
217229
$(grep dbpassword $NCPATH/config/config.php)
218230
$(grep dbname $NCPATH/config/config.php)
219231
220-
In case you try to access Adminer and get 'Forbidden' you need to change the IP in:
221-
$ADMINER_CONF"
232+
In case you try to access AdminNeo and get 'Forbidden' you need to change the IP in:
233+
$ADMINNEO_CONF"
222234
fi

lib.sh

Lines changed: 7 additions & 7 deletions
Original file line numberDiff line numberDiff line change
@@ -165,10 +165,10 @@ PHP_MODS_DIR=/etc/php/"$PHPVER"/mods-available
165165
opcache_interned_strings_buffer_value=24
166166
# Notify push
167167
NOTIFY_PUSH_SERVICE_PATH="/etc/systemd/system/notify_push.service"
168-
# Adminer
169-
ADMINERDIR=/usr/share/adminer
170-
ADMINER_CONF="$SITES_AVAILABLE/adminer.conf"
171-
ADMINER_CONF_PLUGIN="$ADMINERDIR/extra_plugins.php"
168+
# AdminNeo
169+
ADMINNEODIR=/usr/share/adminneo
170+
ADMINNEO_CONF="$SITES_AVAILABLE/adminneo.conf"
171+
ADMINNEO_CONF_PLUGIN="$ADMINNEODIR/extra_plugins.php"
172172
# Get latest AdminNeo version dynamically from GitHub releases
173173
get_adminneo_version() {
174174
local version
@@ -183,8 +183,8 @@ get_adminneo_version() {
183183
echo "5.1.1"
184184
fi
185185
}
186-
ADMINER_VERSION=$(get_adminneo_version)
187-
ADMINER_DOWNLOAD_URL="https://www.adminneo.org/files/${ADMINER_VERSION}/pgsql_en_default/adminneo-${ADMINER_VERSION}.php"
186+
ADMINNEO_VERSION=$(get_adminneo_version)
187+
ADMINNEO_DOWNLOAD_URL="https://www.adminneo.org/files/${ADMINNEO_VERSION}/pgsql_en_default/adminneo-${ADMINNEO_VERSION}.php"
188188
# Redis
189189
REDIS_CONF=/etc/redis/redis.conf
190190
REDIS_SOCK=/var/run/redis/redis-server.sock
@@ -847,7 +847,7 @@ return 0
847847
}
848848

849849

850-
# Check that the script can see the external IP (apache fails otherwise), used e.g. in the adminer app script.
850+
# Check that the script can see the external IP (apache fails otherwise), used e.g. in the adminneo app script.
851851
check_external_ip() {
852852
if [ -z "$WANIP4" ]
853853
then

menu/additional_apps.sh

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -73,7 +73,7 @@ case "$choice" in
7373
;;&
7474
*"AdminNeo"*)
7575
print_text_in_color "$ICyan" "Downloading the AdminNeo script..."
76-
run_script APP adminer
76+
run_script APP adminneo
7777
;;&
7878
*"ClamAV"*)
7979
print_text_in_color "$ICyan" "Downloading the ClamAV script..."

nextcloud_update.sh

Lines changed: 23 additions & 12 deletions
Original file line numberDiff line numberDiff line change
@@ -575,18 +575,29 @@ fi
575575
# Make sure services are restarted
576576
restart_webserver
577577

578-
# Update adminer
579-
if [ -d "$ADMINERDIR" ]
580-
then
581-
print_text_in_color "$ICyan" "Updating Adminer..."
582-
rm -f "$ADMINERDIR"/latest.php "$ADMINERDIR"/adminer.php "$ADMINERDIR"/adminer-pgsql.php
583-
# Download the latest version
584-
curl_to_dir "https://download.adminerevo.org/latest/adminer" "adminer-pgsql.zip" "$ADMINERDIR"
585-
install_if_not unzip
586-
# Unzip the latest version
587-
unzip "$ADMINERDIR"/adminer-pgsql.zip -d "$ADMINERDIR"
588-
rm -f "$ADMINERDIR"/adminer-pgsql.zip
589-
mv "$ADMINERDIR"/adminer-pgsql.php "$ADMINERDIR"/adminer.php
578+
# Remove any legacy Adminer files before ensuring AdminNeo is up-to-date
579+
cleanup_legacy_adminer_files
580+
581+
# Update adminneo
582+
if [ -d "$ADMINNEODIR" ]
583+
then
584+
print_text_in_color "$ICyan" "Updating AdminNeo..."
585+
rm -f "$ADMINNEODIR"/latest.php "$ADMINNEODIR"/adminneo.php "$ADMINNEODIR"/adminneo-pgsql.php
586+
587+
if curl_to_dir "https://www.adminneo.org/files/${ADMINNEO_VERSION}/pgsql_en_default/" "adminneo-${ADMINNEO_VERSION}.php" "$ADMINNEODIR"
588+
then
589+
if [ -f "$ADMINNEODIR/adminneo-${ADMINNEO_VERSION}.php" ]
590+
then
591+
mv "$ADMINNEODIR/adminneo-${ADMINNEO_VERSION}.php" "$ADMINNEODIR/adminneo.php"
592+
elif [ -f "$ADMINNEODIR/adminerneo-${ADMINNEO_VERSION}-pgsql.php" ]
593+
then
594+
mv "$ADMINNEODIR/adminerneo-${ADMINNEO_VERSION}-pgsql.php" "$ADMINNEODIR/adminneo.php"
595+
else
596+
print_text_in_color "$IRed" "AdminNeo download completed but expected files were not found."
597+
fi
598+
else
599+
print_text_in_color "$IRed" "Failed to update AdminNeo from $ADMINNEO_DOWNLOAD_URL"
600+
fi
590601
fi
591602

592603
# Get latest Maxmind databse for Geoblock

not-supported/firewall.sh

Lines changed: 3 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -54,9 +54,9 @@ ufw allow https comment https
5454
print_text_in_color "$ICyan" "UPnP"
5555
ufw allow proto udp from 192.168.0.0/16 comment UPnP
5656

57-
# Adminer
58-
print_text_in_color "$ICyan" "Allow Adminer"
59-
ufw allow 9443/tcp comment Adminer
57+
# AdminNeo
58+
print_text_in_color "$ICyan" "Allow AdminNeo"
59+
ufw allow 9443/tcp comment AdminNeo
6060

6161
# Netdata
6262
print_text_in_color "$ICyan" "Allow Netdata"

static/index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<p>Note: To access Webmin externally you have to open port 10000 in your router, it's not recommended though due to security concerns.</p>
120120
</div>
121121

122-
<h2>Access Adminer</h2>
122+
<h2>Access AdminNeo</h2>
123123

124124
<div class="information">
125125
<p>Use the following address:
@@ -132,7 +132,7 @@
132132
<h3>
133133
<a href="https://docs.hanssonit.se/s/W6fMouPiqQz3_Mog/virtual-machines-vm/d/W6fMquPiqQz3_Moi/nextcloud-vm-first-setup-instructions?currentPageId=W6ypBePiqQz3_Mp0" target="_blank">Login details</a>
134134
</h3>
135-
<p>Note: Your LAN IP is set as approved in /etc/apache2/sites-available/adminer.conf, all other access is forbidden.</p>
135+
<p>Note: Your LAN IP is set as approved in /etc/apache2/sites-available/adminneo.conf, all other access is forbidden.</p>
136136
</div>
137137

138138
<h2>Follow us on Social Media</h2>

static/nhss_index.php

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -119,7 +119,7 @@
119119
<p>Note: To access Webmin externally you have to open port 10000 in your router, it's not recommended though due to security concerns.</p>
120120
</div>
121121

122-
<h2>Access Adminer</h2>
122+
<h2>Access AdminNeo</h2>
123123

124124
<div class="information">
125125
<p>Use the following address:
@@ -132,7 +132,7 @@
132132
<h3>
133133
<a href="https://docs.hanssonit.se/s/blkkp2qhv0jgrltpicl0/nextcloud-homesme-server/d/blkkp2qhv0jgrltpid50/server-installation-instructions?currentPageId=blkkp2qhv0jgrltpidcg" target="_blank">Login details</a>
134134
</h3>
135-
<p>Note: Your LAN IP is set as approved in /etc/apache2/sites-available/adminer.conf, all other access is forbidden.</p>
135+
<p>Note: Your LAN IP is set as approved in /etc/apache2/sites-available/adminneo.conf, all other access is forbidden.</p>
136136
</div>
137137

138138
<h2>Follow us on Social Media</h2>

0 commit comments

Comments
 (0)