Snap: store media in the proper directory #695

Closed
elegaanz wants to merge 1 commit from snap-media-dir into master
2 changed files with 3 additions and 0 deletions

View file

@ -45,4 +45,6 @@ then
touch ${SNAP_COMMON}/initial-migrations-run
fi
mdkir "${SNAP_DATA}/media"
RAOF commented 2019-11-16 04:33:48 +00:00 (Migrated from github.com)
Review

The configure hook gets run each time the snap is upgraded; the name might be a bit misleading. This would fail the first time the snap is upgraded, as mkdir will fail to create an existing directory.

It's also slightly misspelled 😉

The `configure` hook gets run each time the snap is upgraded; the name might be a bit misleading. This would fail the first time the snap is upgraded, as `mkdir` will fail to create an existing directory. It's also *slightly* misspelled :wink:
exit 0

View file

@ -24,6 +24,7 @@ ROCKET_ADDRESS="$(snapctl get listen.address)"
ROCKET_PORT="$(snapctl get listen.port)"
export ROCKET_SECRET_KEY="$(cat ${SNAP_COMMON}/rocket-secret-key)"
export SEARCH_INDEX="${SNAP_DATA}/search_index"
export MEDIA_UPLOAD_DIRECTORY="${SNAP_DATA}/media"
cd ${SNAP}
exec $@