403Webshell
Server IP : 88.99.149.37  /  Your IP : 216.73.216.141
Web Server : nginx/1.31.2
System : Linux server-88-99-149-37 6.12.0-124.56.5.el10_1.x86_64 #1 SMP PREEMPT_DYNAMIC Fri May 15 06:12:08 EDT 2026 x86_64
User : muralimurth ( 1015)
PHP Version : 8.4.23
Disable Function : exec,system,passthru,shell_exec,proc_close,proc_open,dl,popen,show_source,posix_kill,posix_mkfifo,posix_getpwuid,posix_setpgid,posix_setsid,posix_setuid,posix_setgid,posix_seteuid,posix_setegid,posix_uname
MySQL : OFF  |  cURL : ON  |  WGET : ON  |  Perl : ON  |  Python : OFF  |  Sudo : ON  |  Pkexec : ON
Directory :  /proc/thread-self/root/usr/pgsql-17/bin/

Upload File :
current_dir [ Writeable ] document_root [ Writeable ]

 

Command :


[ Back ]     

Current File : /proc/thread-self/root/usr/pgsql-17/bin/postgresql-17-check-db-dir
#!/bin/sh

# This script verifies that the postgresql data directory has been correctly
# initialized.  We do not want to automatically initdb it, because that has
# a risk of catastrophic failure (ie, overwriting a valuable database) in
# corner cases, such as a remotely mounted database on a volume that's a
# bit slow to mount.  But we can at least emit a message advising newbies
# what to do.

PGDATA="$1"

if [ -z "$PGDATA" ]
then
    echo "Usage: $0 database-path"
    exit 1
fi

# PGVERSION is the full package version, e.g., 17.0
# Note: the specfile inserts the correct value during package build
PGVERSION=17
# PGMAJORVERSION is major version, e.g., 17 (this should match PG_VERSION)
PGMAJORVERSION=`echo "$PGVERSION" | sed 's/^\([0-9]*\.[0-9]*\).*$/\1/'`
# PREVMAJORVERSION is the previous major version, e.g., 15 for upgrades
# Note: the specfile inserts the correct value during package build
PREVMAJORVERSION=16
# PGDOCDIR is the directory containing the package's documentation
# Note: the specfile inserts the correct value during package build
PGDOCDIR=/usr/share/doc/postgresql17

# Check for the PGDATA structure
if [ -f "$PGDATA/PG_VERSION" ] && [ -d "$PGDATA/base" ]
then
    # Check version of existing PGDATA
    if [ x`cat "$PGDATA/PG_VERSION"` = x"$PGMAJORVERSION" ]
    then
        : A-OK
    elif [ x`cat "$PGDATA/PG_VERSION"` = x"$PREVMAJORVERSION" ]
    then
        echo $"An old version of the database format was found."
        echo $"Use \"postgresql-setup upgrade\" to upgrade to version $PGMAJORVERSION."
        echo $"See $PGDOCDIR/README.rpm-dist for more information."
        exit 1
    else
        echo $"An old version of the database format was found."
        echo $"You need to dump and reload before using PostgreSQL $PGMAJORVERSION."
        echo $"See $PGDOCDIR/README.rpm-dist for more information."
        exit 1
    fi
else
    # No existing PGDATA! Warn the user to initdb it.
    echo $"\"$PGDATA\" is missing or empty."
    echo $"Use \"/usr/pgsql-17/bin/postgresql-17-setup initdb\" to initialize the database cluster."
    echo $"See $PGDOCDIR/README.rpm-dist for more information."
    exit 1
fi

exit 0

Youez - 2016 - github.com/yon3zu
LinuXploit