pleroma_secret config file defined in one place

This commit is contained in:
Bob Mottram 2018-04-07 21:46:48 +01:00
parent 3420e71e81
commit 30af6b69a7
1 changed files with 1 additions and 2 deletions

View File

@ -42,6 +42,7 @@ PLEROMA_COMMIT='303289d7daac3a51f991bb8603f36628a5d944c1'
PLEROMA_ADMIN_PASSWORD= PLEROMA_ADMIN_PASSWORD=
PLEROMA_DIR=/etc/pleroma PLEROMA_DIR=/etc/pleroma
PLEROMA_SECRET_KEY="" PLEROMA_SECRET_KEY=""
pleroma_secret=$PLEROMA_DIR/config/dev.secret.exs
PLEROMA_BACKGROUND_IMAGE_URL= PLEROMA_BACKGROUND_IMAGE_URL=
@ -406,7 +407,6 @@ function pleroma_create_database {
echo $"Missing directory $PLEROMA_DIR/config" echo $"Missing directory $PLEROMA_DIR/config"
exit 7835393 exit 7835393
fi fi
pleroma_secret=$PLEROMA_DIR/config/dev.secret.exs
if [ ! -f $PLEROMA_DIR/config/dev.exs ]; then if [ ! -f $PLEROMA_DIR/config/dev.exs ]; then
echo $"Did not find $PLEROMA_DIR/config/dev.exs" echo $"Did not find $PLEROMA_DIR/config/dev.exs"
exit 78923528 exit 78923528
@ -1186,7 +1186,6 @@ function install_pleroma {
# We need to set up the url option again because it somehow gets # We need to set up the url option again because it somehow gets
# lost during mix compile # lost during mix compile
pleroma_secret=$PLEROMA_DIR/config/dev.secret.exs
if ! grep -q 'watchers: [],' $pleroma_secret; then if ! grep -q 'watchers: [],' $pleroma_secret; then
sed -i 's|watchers: \[\]|watchers: \[\],|g' $pleroma_secret sed -i 's|watchers: \[\]|watchers: \[\],|g' $pleroma_secret
fi fi