Add filtering config to pleroma
This commit is contained in:
parent
9a441ec4dc
commit
7f4f4f2c84
|
@ -62,6 +62,23 @@ pleroma_variables=(ONION_ONLY
|
|||
MY_EMAIL_ADDRESS
|
||||
MY_USERNAME)
|
||||
|
||||
function pleroma_add_filtering {
|
||||
if grep -q "# begin filtering" $pleroma_secret; then
|
||||
return
|
||||
fi
|
||||
sed -i '/pbkdf2_rounds/a reject: []' $pleroma_secret
|
||||
sed -i '/pbkdf2_rounds/a federated_timeline_removal: [],' $pleroma_secret
|
||||
sed -i '/pbkdf2_rounds/a media_nsfw: [],' $pleroma_secret
|
||||
sed -i '/pbkdf2_rounds/a media_removal: [],' $pleroma_secret
|
||||
sed -i '/pbkdf2_rounds/a config :pleroma, :mrf_simple,' $pleroma_secret
|
||||
sed -i '/pbkdf2_rounds/a # begin filtering' $pleroma_secret
|
||||
|
||||
sed -i 's|reject: [| reject: [|g' $pleroma_secret
|
||||
sed -i 's|federated_timeline_removal: [| federated_timeline_removal: [|g' $pleroma_secret
|
||||
sed -i 's|media_nsfw: [| media_nsfw: [|g' $pleroma_secret
|
||||
sed -i 's|media_removal: [| media_removal: [|g' $pleroma_secret
|
||||
}
|
||||
|
||||
function pleroma_enable_chat {
|
||||
if [[ "$1" == 't'* || "$1" == 'y'* || "$1" == 'T'* || "$1" == 'Y'* ]]; then
|
||||
sed -i 's|"chatDisabled":.*|"chatDisabled": false,|g' $PLEROMA_DIR/priv/static/static/config.json
|
||||
|
@ -1308,6 +1325,8 @@ function install_pleroma {
|
|||
fi
|
||||
sed -i 's|"chatDisabled":.*|"chatDisabled": true,|g' $PLEROMA_DIR/priv/static/static/config.json
|
||||
|
||||
pleroma_add_filtering
|
||||
|
||||
systemctl daemon-reload
|
||||
systemctl enable pleroma
|
||||
systemctl start pleroma
|
||||
|
|
Loading…
Reference in New Issue