mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2025-02-25 18:55:31 -06:00
Add a --yes command line option to setup-web.sh to allow non-interactive use. Fixes #5610.
This commit is contained in:
parent
f93cfe8c4c
commit
f57558fdb2
@ -9,6 +9,7 @@ This release contains a number of bug fixes and new features since the release o
|
|||||||
New features
|
New features
|
||||||
************
|
************
|
||||||
|
|
||||||
|
| `Issue #5610 <https://redmine.postgresql.org/issues/5610>`_ - Add a --yes command line option to setup-web.sh to allow non-interactive use.
|
||||||
|
|
||||||
Housekeeping
|
Housekeeping
|
||||||
************
|
************
|
||||||
@ -20,4 +21,4 @@ Bug fixes
|
|||||||
*********
|
*********
|
||||||
|
|
||||||
| `Issue #4810 <https://redmine.postgresql.org/issues/4810>`_ - Fixed an issue where the user is not able to save the new row if the table is empty.
|
| `Issue #4810 <https://redmine.postgresql.org/issues/4810>`_ - Fixed an issue where the user is not able to save the new row if the table is empty.
|
||||||
| `Issue #5646 <https://redmine.postgresql.org/issues/5646>`_ - Ensure that RLS Policy node should be searchable using search object.
|
| `Issue #5646 <https://redmine.postgresql.org/issues/5646>`_ - Ensure that RLS Policy node should be searchable using search object.
|
||||||
|
@ -9,11 +9,23 @@ if [ "$EUID" -ne 0 ]
|
|||||||
exit 1
|
exit 1
|
||||||
fi
|
fi
|
||||||
|
|
||||||
|
if [[ "$#" -ne 0 ]] && ([[ "$#" -eq 1 ]] && [[ "$1" != "--yes" ]]); then
|
||||||
|
echo "Usage: $0 [--yes]"
|
||||||
|
exit 1
|
||||||
|
fi
|
||||||
|
|
||||||
# Get the distro
|
# Get the distro
|
||||||
IS_REDHAT=0
|
IS_REDHAT=0
|
||||||
IS_DEBIAN=0
|
IS_DEBIAN=0
|
||||||
UNAME=$(uname -a)
|
UNAME=$(uname -a)
|
||||||
|
|
||||||
|
# Is this an automated install?
|
||||||
|
AUTOMATED=0
|
||||||
|
if [ "$#" -eq 1 ]; then
|
||||||
|
AUTOMATED=1
|
||||||
|
echo "Running in non-interactive mode..."
|
||||||
|
fi
|
||||||
|
|
||||||
if [ -f /etc/redhat-release ]; then
|
if [ -f /etc/redhat-release ]; then
|
||||||
IS_REDHAT=1
|
IS_REDHAT=1
|
||||||
APACHE=httpd
|
APACHE=httpd
|
||||||
@ -57,7 +69,12 @@ fi
|
|||||||
|
|
||||||
# Setup Apache on Debian/Ubuntu
|
# Setup Apache on Debian/Ubuntu
|
||||||
if [ ${IS_DEBIAN} == 1 ]; then
|
if [ ${IS_DEBIAN} == 1 ]; then
|
||||||
read -p "We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? " RESPONSE
|
if [ ${AUTOMATED} == 1 ]; then
|
||||||
|
RESPONSE=Y
|
||||||
|
else
|
||||||
|
read -p "We can now configure the Apache Web server for you. This involves enabling the wsgi module and configuring the pgAdmin 4 application to mount at /pgadmin4. Do you wish to continue (y/n)? " RESPONSE
|
||||||
|
fi
|
||||||
|
|
||||||
case ${RESPONSE} in
|
case ${RESPONSE} in
|
||||||
y|Y )
|
y|Y )
|
||||||
a2enmod wsgi 1> /dev/null
|
a2enmod wsgi 1> /dev/null
|
||||||
@ -70,7 +87,12 @@ fi
|
|||||||
|
|
||||||
APACHE_STATUS=`ps cax | grep ${APACHE}`
|
APACHE_STATUS=`ps cax | grep ${APACHE}`
|
||||||
if [ $? -eq 0 ]; then
|
if [ $? -eq 0 ]; then
|
||||||
read -p "The Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y/n)? " RESPONSE
|
if [ ${AUTOMATED} == 1 ]; then
|
||||||
|
RESPONSE=Y
|
||||||
|
else
|
||||||
|
read -p "The Apache web server is running and must be restarted for the pgAdmin 4 installation to complete. Continue (y/n)? " RESPONSE
|
||||||
|
fi
|
||||||
|
|
||||||
case ${RESPONSE} in
|
case ${RESPONSE} in
|
||||||
y|Y )
|
y|Y )
|
||||||
systemctl restart ${APACHE}
|
systemctl restart ${APACHE}
|
||||||
@ -83,7 +105,12 @@ if [ $? -eq 0 ]; then
|
|||||||
exit 1;;
|
exit 1;;
|
||||||
esac
|
esac
|
||||||
else
|
else
|
||||||
read -p "The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? " RESPONSE
|
if [ ${AUTOMATED} == 1 ]; then
|
||||||
|
RESPONSE=Y
|
||||||
|
else
|
||||||
|
read -p "The Apache web server is not running. We can enable and start the web server for you to finish pgAdmin 4 installation. Continue (y/n)? " RESPONSE
|
||||||
|
fi
|
||||||
|
|
||||||
case ${RESPONSE} in
|
case ${RESPONSE} in
|
||||||
y|Y )
|
y|Y )
|
||||||
systemctl enable ${APACHE}
|
systemctl enable ${APACHE}
|
||||||
|
Loading…
Reference in New Issue
Block a user