Skip to content

Instantly share code, notes, and snippets.

@talhasch
Last active December 14, 2020 08:48
Show Gist options
  • Star 1 You must be signed in to star a gist
  • Fork 0 You must be signed in to fork a gist
  • Save talhasch/35897a835c3df06668cc44218bdcf35f to your computer and use it in GitHub Desktop.
Save talhasch/35897a835c3df06668cc44218bdcf35f to your computer and use it in GitHub Desktop.
hivemind update script
#!/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