More pleroma checks
This commit is contained in:
parent
ac4e4febf4
commit
9de25b9bc7
|
@ -223,8 +223,16 @@ function pleroma_create_database {
|
|||
write_config_param "PLEROMA_SECRET_KEY" "$PLEROMA_SECRET_KEY"
|
||||
fi
|
||||
|
||||
pleroma_secret=config/dev.secret.exs
|
||||
cp config/dev.exs $pleroma_secret
|
||||
if [ ! -d $PLEROMA_DIR/config ]; then
|
||||
echo $"Missing directory $PLEROMA_DIR/config"
|
||||
exit 7835393
|
||||
fi
|
||||
pleroma_secret=$PLEROMA_DIR/config/dev.secret.exs
|
||||
if [ ! -f $PLEROMA_DIR/config/dev.exs ]; then
|
||||
echo $"Did not find $PLEROMA_DIR/config/dev.exs"
|
||||
exit 78923528
|
||||
fi
|
||||
cp $PLEROMA_DIR/config/dev.exs $pleroma_secret
|
||||
sed -i "s|username:.*|username: \"pleroma\",|g" $pleroma_secret
|
||||
sed -i "s|password:.*|password: \"$PLEROMA_ADMIN_PASSWORD\",|g" $pleroma_secret
|
||||
sed -i "s|database:.*|database: \"pleroma\",|g" $pleroma_secret
|
||||
|
@ -246,7 +254,7 @@ function pleroma_create_database {
|
|||
fi
|
||||
|
||||
cd $PLEROMA_DIR
|
||||
chown -R pleroma:pleroma *
|
||||
chown -R pleroma:pleroma $PLEROMA_DIR/*
|
||||
sudo -u pleroma mix local.rebar --force
|
||||
if [ ! "$?" = "0" ]; then
|
||||
run_system_query_postgresql "ALTER USER pleroma NOSUPERUSER;"
|
||||
|
|
Loading…
Reference in New Issue