Commit ed67e02a authored by sim's avatar sim

Handle setup interruption to avoid inconsistant config

parent 07d8acae
......@@ -63,6 +63,9 @@ if [ -f "$GARGANTEXT_CONF" -a -z "$FORCE" ]; then
exit
fi
# At this point, delete configuration files if this script is interrupted
trap "rm -f $GARGANTEXT_CONF $POSTGREST_CONF && echo -e '\nInterrupted' && exit 1" INT
# Check permissions for configuration file
D=$(dirname $GARGANTEXT_CONF)
if ! (mkdir -p $D && touch $GARGANTEXT_CONF 2>/dev/null); then
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment