public inbox for [email protected]  
help / color / mirror / Atom feed
setup-web.sh - support for suse 12/15
2+ messages / 2 participants
[nested] [flat]

* setup-web.sh - support for suse 12/15
@ 2022-03-17 11:42  Sandeep Thakkar <[email protected]>
  0 siblings, 1 reply; 2+ messages in thread

From: Sandeep Thakkar @ 2022-03-17 11:42 UTC (permalink / raw)
  To: pgadmin-hackers

Hi,

Please find attached the patch for the setup-web.sh to add support for the
SUSE platform. I verified it on SUSE 12 and 15, x86_64 and PPCLE
architectures

Thanks,

-- 
Sandeep Thakkar


Attachments:

  [application/octet-stream] suse-support-setupweb.patch (1.6K, 3-suse-support-setupweb.patch)
  download | inline diff:
diff --git a/pkg/linux/setup-web.sh b/pkg/linux/setup-web.sh
index 86607898f..a279841a3 100755
--- a/pkg/linux/setup-web.sh
+++ b/pkg/linux/setup-web.sh
@@ -16,6 +16,7 @@ fi
 
 IS_REDHAT=0
 IS_DEBIAN=0
+IS_SUSE=0
 UNAME=$(uname -a)
 
 # Get the distro from the environment
@@ -24,6 +25,11 @@ if [ "x${PGADMIN_PLATFORM_TYPE}" == "x" ]; then
         PLATFORM_TYPE=redhat
     elif [[ ${UNAME} =~ "Ubuntu" ]] || [[ ${UNAME} =~ "Debian" ]] || [ -f /etc/apt/sources.list ]; then
         PLATFORM_TYPE=debian
+    elif [ -f /etc/os-release ]; then
+        if grep suse /etc/os-release > /dev/null
+        then
+            PLATFORM_TYPE=suse
+        fi
     else
         echo "Failed to detect the platform. This may mean you're running on a Linux distribution that isn't supported by pgAdmin."
         echo "Please set the PGADMIN_PLATFORM_TYPE environment variable to one of 'redhat' or 'debian' and try again."
@@ -45,6 +51,11 @@ case ${PLATFORM_TYPE} in
         IS_DEBIAN=1
         APACHE=apache2
         ;;
+    suse)
+        echo "Setting up pgAdmin 4 in web mode on a SUSE based platform..."
+        IS_SUSE=1
+        APACHE=apache2
+        ;;
 
     *)
         echo "Invalid value for the PGADMIN_PLATFORM_TYPE environment variable. Please set it to one of 'redhat' or 'debian' and try again."
@@ -75,6 +86,8 @@ mkdir -p /var/log/pgadmin /var/lib/pgadmin
 
 if [ ${IS_REDHAT} == 1 ]; then
     chown apache: /var/log/pgadmin /var/lib/pgadmin -R
+elif [ ${IS_SUSE} == 1 ]; then
+    chown wwwrun: /var/log/pgadmin /var/lib/pgadmin -R
 else
     chown www-data: /var/log/pgadmin /var/lib/pgadmin -R
 fi


^ permalink  raw  reply  [nested|flat] 2+ messages in thread

* Re: setup-web.sh - support for suse 12/15
@ 2022-03-22 09:28  Akshay Joshi <[email protected]>
  parent: Sandeep Thakkar <[email protected]>
  0 siblings, 0 replies; 2+ messages in thread

From: Akshay Joshi @ 2022-03-22 09:28 UTC (permalink / raw)
  To: Sandeep Thakkar <[email protected]>; +Cc: pgadmin-hackers

Thanks, the patch applied.

On Thu, Mar 17, 2022 at 5:12 PM Sandeep Thakkar <
[email protected]> wrote:

> Hi,
>
> Please find attached the patch for the setup-web.sh to add support for the
> SUSE platform. I verified it on SUSE 12 and 15, x86_64 and PPCLE
> architectures
>
> Thanks,
>
> --
> Sandeep Thakkar
>
>
>

-- 
*Thanks & Regards*
*Akshay Joshi*
*pgAdmin Hacker | Principal Software Architect*
*EDB Postgres <http://edbpostgres.com>*

*Mobile: +91 976-788-8246*


^ permalink  raw  reply  [nested|flat] 2+ messages in thread


end of thread, other threads:[~2022-03-22 09:28 UTC | newest]

Thread overview: 2+ messages (download: mbox mbox.gz follow: Atom feed)
-- links below jump to the message on this page --
2022-03-17 11:42 setup-web.sh - support for suse 12/15 Sandeep Thakkar <[email protected]>
2022-03-22 09:28 ` Akshay Joshi <[email protected]>

This inbox is served by agora; see mirroring instructions
for how to clone and mirror all data and code used for this inbox