oduwsdl / raintale

A Python utility for publishing a social media story built from archived web pages to multiple services.
https://oduwsdl.github.io/raintale
MIT License
11 stars 3 forks source link

set-raintale-database.sh: hang due to grep without input #42

Open ato opened 2 years ago

ato commented 2 years ago

set-raintale-database.sh hangs after printing:

verifying that database is empty
discovered 0 tables in the database
database is empty, continuing
writing database information to /opt/raintale/raintale-gui/../hypercane_with_wooey/hypercane_with_wooey/settings/user_settings.py

It appears to be stuck with this grep command reading from stdin:

https://github.com/oduwsdl/raintale/blob/c8885ffa63ef9e3d869522d98749ed18179d16e2/raintale-gui/set-raintale-database.sh#L107

shawnmjones commented 2 years ago

Thanks for this. That path is wrong. It seem like a copy/paste from the Hypercane work was not completely scrubbed to make sure the paths were correct.

shawnmjones commented 2 years ago

And when I commented on this days ago I noticed one issue in the output and neglected to comment on the issue with the grep.

ato commented 2 years ago

I tested the new version and this problem was resolved.

ato commented 2 years ago

Actually it just silently failed and didn't configure anything. :sweat_smile:

Note the grep is looking for MEMENTOEMBED_ENDPOINT in user_settings.py, but that line actually seems to be in raintale.conf:

settings_file=${WOOEY_DIR}/raintale_with_wooey/settings/user_settings.py
raintale_conf=/etc/raintale.conf

echo "writing database information to ${settings_file}"

ME_line=`grep MEMENTOEMBED_ENDPOINT ${settings_file}`
shawnmjones commented 2 years ago

I am removing this from the project as part of the IIPC 2021 Grant project closeout. It still needs to be reviewed by a third party.