mirror of
https://github.com/freedombox/FreedomBox.git
synced 2026-11-29 08:25:10 +00:00
users: Improve diagnostics
- Move diagnostics into main module instead of action script. - Ability run diagnostics as non-root user (because it runs in Plinth instead of action). - Diagnose whether LDAP server is listening. - Diagnose directory entities created during setup.
This commit is contained in:
1 parent
0febeb7244
commit
4210332bf6
3 files changed
+31
-19
No files matched your search
@@ -121,17 +121,6 @@ remove_user_from_group()
|
||||
}
|
||||
|
||||
|
||||
diagnose()
|
||||
{
|
||||
result="failed"
|
||||
if lsldap | grep 'dn: dc=thisbox' > /dev/null; then
|
||||
result="passed"
|
||||
fi
|
||||
|
||||
echo "[[\"Access LDAP server locally\", \"$result\"]]"
|
||||
}
|
||||
|
||||
|
||||
setup()
|
||||
{
|
||||
# XXX: Password setting on users is disabled as changing passwords
|
||||
@@ -174,9 +163,6 @@ case $command in
|
||||
remove-user-from-group)
|
||||
remove_user_from_group "$@"
|
||||
;;
|
||||
diagnose)
|
||||
diagnose "$@"
|
||||
;;
|
||||
*)
|
||||
echo "Invalid sub-command"
|
||||
exit -1
|
||||
|
||||
Reference in new issue
Block a user