55true
66SCRIPT_NAME=" AdminNeo"
77SCRIPT_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.
99More info: https://www.adminneo.org"
1010# shellcheck source=lib.sh
1111source /var/scripts/fetch_lib.sh
@@ -19,8 +19,8 @@ debug_mode
1919# Check if root
2020root_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
2424then
2525 # Ask for installing
2626 install_popup " $SCRIPT_NAME "
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
5264a2enmod rewrite
5365a2enmod ssl
5466
55- # Install Adminer
67+ # Install AdminNeo
5668apt-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 "
6375then
6476 msg_box " Failed to download AdminNeo. The download URL may have changed.
6577
6678Please report this issue to: $ISSUES
6779
6880Attempted to download from:
69- $ADMINER_DOWNLOAD_URL "
81+ $ADMINNEO_DOWNLOAD_URL "
7082 exit 1
7183fi
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" ]
7587then
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" ]
7890then
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"
8193else
8294 msg_box " Failed to find downloaded AdminNeo file. Please report this to $ISSUES "
8395 exit 1
8496fi
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
89101if 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
102114function 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 ###
166178167- # 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
196208if ! restart_webserver
197209then
@@ -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:
207219https://$ADDRESS :9443
208220
209221You can download more plugins and get more information here:
210- https://www.adminer .org
222+ https://www.adminneo .org
211223
212224Your PostgreSQL connection information can be found in $NCPATH /config/config.php.
213225These 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 "
222234fi
0 commit comments