-
Notifications
You must be signed in to change notification settings - Fork 62
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
use bash script for postgress too. Also I think requirements.txt nede…
…d to be redone
- Loading branch information
1 parent
7ea6e16
commit 5dce35d
Showing
5 changed files
with
40 additions
and
70 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,13 +1,9 @@ | ||
SQLAlchemy==1.0.14 | ||
zmq==0.0.0 | ||
pyzmq==15.2.0 | ||
psycopg2==2.6.1 | ||
lockfile==0.10.2 | ||
tabulate==0.7.5 | ||
pexpect==3.2 | ||
psutil==5.6.6 | ||
ipython==2.3.0 | ||
colorama==0.3.2 | ||
numpy==1.8.2 | ||
argparse==1.2.1 | ||
pandare | ||
colorama | ||
db | ||
ipython | ||
lockfile | ||
numpy | ||
pandare | ||
PyYAML | ||
SQLAlchemy | ||
tabulate |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,24 @@ | ||
#!/bin/bash | ||
set -ex | ||
|
||
PGPASS="${HOME}/.pgpass" | ||
|
||
if [ ! -f "${PGPASS}" ]; then | ||
postgres_depends=$(dpkg-query -W -f='${depends}' 'postgresql') | ||
postgres_pkg=$(echo "${postgres_depends}" | grep -oP 'postgresql-[0-9]+.?[0-9]+') | ||
postgres_version=${postgres_pkg/postgresql-/} | ||
pg_hba="/etc/postgresql/${postgres_version}/main/pg_hba.conf" | ||
postgres_password='postgrespostgres' | ||
|
||
sudo sed -i.bak -E 's/^(local\s+all\s+postgres\s+)md5$/\1peer/' "${pg_hba}" | ||
sudo service postgresql reload | ||
|
||
password_sql="ALTER USER postgres WITH PASSWORD '${postgres_password}';" | ||
sudo -u postgres psql -c "${password_sql}" | ||
|
||
echo "*:*:*:postgres:${postgres_password}" > "${PGPASS}" | ||
chmod 600 "${PGPASS}" | ||
|
||
sudo sed -i.bak -E 's/^(local\s+all\s+postgres\s+)peer$/\1md5/' "${pg_hba}" | ||
sudo service postgresql reload | ||
fi |
This file was deleted.
Oops, something went wrong.