Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
F
freedombone
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Iterations
Wiki
Requirements
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Locked files
Build
Pipelines
Jobs
Pipeline schedules
Test cases
Artifacts
Deploy
Releases
Package Registry
Container Registry
Model registry
Operate
Environments
Terraform modules
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Code review analytics
Issue analytics
Insights
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
Context Sensitive Group
freedombone
Commits
c1ef4567
Commit
c1ef4567
authored
7 years ago
by
Bob Mottram
Browse files
Options
Downloads
Patches
Plain Diff
Enable or disable pleroma registrations
parent
99fddf5f
No related branches found
No related tags found
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
src/freedombone-app-pleroma
+31
-5
31 additions, 5 deletions
src/freedombone-app-pleroma
with
31 additions
and
5 deletions
src/freedombone-app-pleroma
+
31
−
5
View file @
c1ef4567
...
...
@@ -62,6 +62,17 @@ pleroma_variables=(ONION_ONLY
MY_EMAIL_ADDRESS
MY_USERNAME
)
function
pleroma_recompile
{
# necessary after parameter changes
sudo
-u
pleroma mix clean
sudo
-u
pleroma mix deps.compile
sudo
-u
pleroma mix compile
if
[
-f
/etc/systemd/system/pleroma.service
]
;
then
systemctl restart pleroma
fi
}
function
logging_on_pleroma
{
echo
-n
''
}
...
...
@@ -344,6 +355,19 @@ function pleroma_set_expire_months {
rm
$data
}
function
pleroma_disable_registrations
{
dialog
--title
$"Disable new Pleroma user registrations"
\
--backtitle
$"Freedombone Control Panel"
\
--yesno
$"
\n
Do you wish to disable new registrations?"
10 60
sel
=
$?
case
$sel
in
0
)
sed
-i
's|registrations_open:.*|registrations_open: false|g'
$PLEROMA_DIR
/config/config.exs
;;
1
)
sed
-i
's|registrations_open:.*|registrations_open: true|g'
$PLEROMA_DIR
/config/config.exs
;;
255
)
return
;;
esac
pleroma_recompile
}
function
configure_interactive_pleroma
{
read_config_param PLEROMA_EXPIRE_MONTHS
while
true
...
...
@@ -352,11 +376,12 @@ function configure_interactive_pleroma {
trap
"rm -f
$data
"
0 1 2 5 15
dialog
--backtitle
$"Freedombone Control Panel"
\
--title
$"Pleroma"
\
--radiolist
$"Choose an operation:"
1
3
70
4
\
--radiolist
$"Choose an operation:"
1
4
70
5
\
1
$"Set a background image"
off
\
2
$"Set the title"
off
\
3
$"Set post expiry period (currently
$PLEROMA_EXPIRE_MONTHS
months)"
off
\
4
$"Exit"
on 2>
$data
3
$"Disable new account registrations"
off
\
4
$"Set post expiry period (currently
$PLEROMA_EXPIRE_MONTHS
months)"
off
\
5
$"Exit"
on 2>
$data
sel
=
$?
case
$sel
in
1
)
return
;;
...
...
@@ -365,8 +390,9 @@ function configure_interactive_pleroma {
case
$(
cat
$data
)
in
1
)
pleroma_set_background_image
;;
2
)
pleroma_set_title
;;
3
)
pleroma_set_expire_months
;;
4
)
break
;;
3
)
pleroma_disable_registrations
;;
4
)
pleroma_set_expire_months
;;
5
)
break
;;
esac
rm
$data
done
...
...
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment