Last active
December 14, 2020 08:48
-
-
Save talhasch/35897a835c3df06668cc44218bdcf35f to your computer and use it in GitHub Desktop.
hivemind update script
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
#!/bin/bash | |
cd /root/hivemind/ | |
git pull | |
python3 setup.py build | |
python3 setup.py install --user | |
rsync -avz /root/hivemind/hive/db/sql_scripts /var/lib/postgresql/ | |
cd /var/lib/postgresql/sql_scripts | |
sudo chown -R postgres:postgres /var/lib/postgresql/sql_scripts | |
sudo -u postgres ./db_upgrade.sh postgres hive | |
sudo rm -Rf /var/lib/postgresql/sql_scripts | |
psql -d hive -c "GRANT SELECT ON ALL TABLES IN SCHEMA public TO remote_read;" | |
echo DONE |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment