Hello! Had trouble running the setup script -- using the sudo -u postgres syntax leaves the home directory set for the calling user, and even when the postgres group was given write and execution privileges I was still getting permissions errors. Didn't want to have to make the postgres user the owner of the repository directory, so changed the _psql command to use sudo su - postgres -c "command" syntax. This runs the command as the postgres user in a login shell which fixed permissions errors for me. I don't think this has any negative effects, but could be wrong.
I also was getting errors calling alyxvenv/bin/python because I accidentally named mine alyxenv, so to make it a bit more flexible (not have to have an exactly correctly named venv) I added a check that the user was in a virtual environment and then changed those calls to just use python.
I also wrapped the commands in try/catch blocks with status reporting because I wasn't sure if the setup was succesful or not :)
Anyway, hope that's useful.
details:
executed commands from README before running setup
Hello! Had trouble running the setup script -- using the
sudo -u postgres
syntax leaves the home directory set for the calling user, and even when the postgres group was given write and execution privileges I was still getting permissions errors. Didn't want to have to make the postgres user the owner of the repository directory, so changed the_psql
command to usesudo su - postgres -c "command"
syntax. This runs the command as the postgres user in a login shell which fixed permissions errors for me. I don't think this has any negative effects, but could be wrong.I also was getting errors calling
alyxvenv/bin/python
because I accidentally named minealyxenv
, so to make it a bit more flexible (not have to have an exactly correctly named venv) I added a check that the user was in a virtual environment and then changed those calls to just usepython
.I also wrapped the commands in try/catch blocks with status reporting because I wasn't sure if the setup was succesful or not :)
Anyway, hope that's useful.
details: