mirror of
https://github.com/pgadmin-org/pgadmin4.git
synced 2024-12-28 01:41:13 -06:00
Update 'setup-web.sh' to use systemctl or service automatically based on what is present on the system at runtime
Initial Patch By: Serhiy Lakas
This commit is contained in:
parent
a737d1167c
commit
77aae3c456
@ -128,7 +128,14 @@ if pgrep ${APACHE} > /dev/null; then
|
||||
|
||||
case ${RESPONSE} in
|
||||
y|Y )
|
||||
if ! systemctl restart ${APACHE}; then
|
||||
COMMAND=""
|
||||
if [ -x "$(command -v systemctl)" ]; then
|
||||
COMMAND="systemctl restart ${APACHE}"
|
||||
elif [ -x "$(command -v service)" ]; then
|
||||
COMMAND="service ${APACHE} restart"
|
||||
fi
|
||||
|
||||
if ! ${COMMAND}; then
|
||||
echo "Error restarting ${APACHE}. Please check the systemd logs"
|
||||
else
|
||||
echo "Apache successfully restarted. You can now start using pgAdmin 4 in web mode at http://127.0.0.1/pgadmin4"
|
||||
|
Loading…
Reference in New Issue
Block a user