|
@@ -733,15 +733,21 @@ function configure_interactive_pleroma {
|
733
|
733
|
enablechatstr=$'Disable chat system'
|
734
|
734
|
fi
|
735
|
735
|
|
|
736
|
+ pleromatorstr=$'Enable routing through Tor for onion addresses'
|
|
737
|
+ if grep -q '9050' $pleroma_secret; then
|
|
738
|
+ pleromatorstr=$'Disable routing through Tor'
|
|
739
|
+ fi
|
|
740
|
+
|
736
|
741
|
W=(1 $"Set a background image"
|
737
|
742
|
2 $"Set the title"
|
738
|
743
|
3 $"Disable new account registrations"
|
739
|
744
|
4 $"Add a custom emoji"
|
740
|
745
|
5 $"Set post expiry period (currently $PLEROMA_EXPIRE_MONTHS months)"
|
741
|
|
- 6 "$enablechatstr")
|
|
746
|
+ 6 "$enablechatstr"
|
|
747
|
+ 7 "$pleromatorstr")
|
742
|
748
|
|
743
|
749
|
# shellcheck disable=SC2068
|
744
|
|
- selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Pleroma" --menu $"Choose an operation, or ESC to exit:" 13 60 6 "${W[@]}" 3>&2 2>&1 1>&3)
|
|
750
|
+ selection=$(dialog --backtitle $"Freedombone Administrator Control Panel" --title $"Pleroma" --menu $"Choose an operation, or ESC to exit:" 14 60 7 "${W[@]}" 3>&2 2>&1 1>&3)
|
745
|
751
|
|
746
|
752
|
if [ ! "$selection" ]; then
|
747
|
753
|
break
|
|
@@ -759,11 +765,24 @@ function configure_interactive_pleroma {
|
759
|
765
|
pleroma_enable_chat true
|
760
|
766
|
fi
|
761
|
767
|
;;
|
|
768
|
+ 7) if grep -q '9050' $pleroma_secret; then
|
|
769
|
+ pleroma_disable_tor
|
|
770
|
+ else
|
|
771
|
+ pleroma_enable_tor
|
|
772
|
+ fi
|
|
773
|
+ ;;
|
762
|
774
|
esac
|
763
|
775
|
done
|
764
|
776
|
}
|
765
|
777
|
|
766
|
|
-function pleroma_upgrade_tor {
|
|
778
|
+function pleroma_disable_tor {
|
|
779
|
+ if grep -q '9050' $pleroma_secret; then
|
|
780
|
+ sed -i '/9050/d' $pleroma_secret
|
|
781
|
+ pleroma_recompile
|
|
782
|
+ fi
|
|
783
|
+}
|
|
784
|
+
|
|
785
|
+function pleroma_enable_tor {
|
767
|
786
|
pleroma_tor_update=
|
768
|
787
|
|
769
|
788
|
if ! grep -q '{:socks5, :localhost, 9050}' $pleroma_secret; then
|
|
@@ -806,7 +825,7 @@ function upgrade_pleroma {
|
806
|
825
|
create_pleroma_blocklist
|
807
|
826
|
fi
|
808
|
827
|
|
809
|
|
- pleroma_upgrade_tor
|
|
828
|
+ #pleroma_enable_tor
|
810
|
829
|
|
811
|
830
|
CURR_PLEROMA_COMMIT=$(get_completion_param "pleroma commit")
|
812
|
831
|
if [[ "$CURR_PLEROMA_COMMIT" == "$PLEROMA_COMMIT" ]]; then
|