Browse Source

fake:


			
			
				rocklinux
			
			
		
fake 19 years ago
parent
commit
0d50bc34b3
1 changed files with 11 additions and 4 deletions
  1. +11
    -4
      package/michiel/postgresql/stone_mod_pgsql.sh

+ 11
- 4
package/michiel/postgresql/stone_mod_pgsql.sh

@ -114,12 +114,19 @@ pgsql_create_db() {
[ -z "$dbname" ] && return;
gui_cmd "Creating database $dbname for user $uname" \
"echo \"D_prefix/bin/createdb $dbname\" | su - $uname"
[ -z "$encoding" ] && encoding="UNICODE"
unset dbname uname
gui_input "Encoding for the database to create:" "$encoding" "encoding"
[ -z "$encoding" ] && return;
gui_cmd "Creating database $dbname for user $uname - $encoding" \
"echo \"D_prefix/bin/createdb -E $encoding $dbname\" | su - $uname"
unset dbname encoding uname
}
pgsql_drop_db() {
if [ -z "$1" -a -z "$uname" ] ; then
pgsql_user_menu pgsql_drop_db ;
@ -144,7 +151,7 @@ pgsql_drop_db() {
}
pgsql_gen_menu () {
eval `echo "D_prefix/bin/initdb --show" 2>&1 | su - postgres | grep PGDATA`
eval `echo "D_prefix/bin/initdb --show 2>&1" | su - postgres | grep PGDATA`
PGPID="`echo "D_prefix/bin/pg_ctl status" | su - postgres | grep -o 'PID: .[^)]*' | tr -d 'PID: '`"
echo "gui_menu pgsql 'PostgresQL Database Setup'"

Loading…
Cancel
Save