pg
This commit is contained in:
16
arch-user/bin/postgres/start.sh
Executable file
16
arch-user/bin/postgres/start.sh
Executable file
@@ -0,0 +1,16 @@
|
||||
#!/bin/bash
|
||||
set -eo pipefail
|
||||
|
||||
if [ "$1" != "foreground" ]; then
|
||||
exec ~/.local/bin/screen/detach.sh postgres "$0" foreground
|
||||
fi
|
||||
|
||||
version="$(pg_config --version | sed -n 's/^PostgreSQL \([0-9]*\).*/\1/p')"
|
||||
export PGDATA=~/know/db/"$version"
|
||||
|
||||
mkdir -p "$PGDATA"
|
||||
if [ ! -f "$PGDATA/postgresql.conf" ]; then
|
||||
initdb
|
||||
fi
|
||||
|
||||
postgres -c "unix_socket_directories=/run/user/$(id -u)" -c "listen_addresses=" -c "io_method=sync"
|
||||
4
arch-user/bin/psql.sh
Executable file
4
arch-user/bin/psql.sh
Executable file
@@ -0,0 +1,4 @@
|
||||
#!/bin/bash
|
||||
set -e
|
||||
|
||||
psql -h "/run/user/$(id -u)" "$1"
|
||||
1
arch-user/config/cliphist/config
Normal file
1
arch-user/config/cliphist/config
Normal file
@@ -0,0 +1 @@
|
||||
max-items 50
|
||||
Reference in New Issue
Block a user