getAdminPassword for shared password/TOTP
This commit is contained in:
parent
b8528ab6eb
commit
ce973458a1
14
diaspora-mod
Normal file → Executable file
14
diaspora-mod
Normal file → Executable file
@ -4,6 +4,12 @@ BT="yipyap.social"
|
||||
h=8
|
||||
w=60
|
||||
|
||||
function showAdminPassword(){
|
||||
clear
|
||||
/home/diaspora/adminpw
|
||||
read -n 1 -p "Press any key to continue."
|
||||
}
|
||||
|
||||
function getBoolSetting(){
|
||||
[ "$(cat "$CONFIG" | grep "$1 =" | awk '{ print $3 }')" = "true" ] && echo "on" || echo "off"
|
||||
}
|
||||
@ -26,9 +32,6 @@ function setBoolSetting(){
|
||||
|
||||
sudo -u diaspora sed -i "s/open = .*/open = $Invites/" "$CONFIG"
|
||||
sudo -u diaspora sed -i "s/enable_registrations = .*/enable_registrations = $Registrations/" "$CONFIG"
|
||||
|
||||
|
||||
|
||||
}
|
||||
|
||||
function setInvitesToZeroForUser(){
|
||||
@ -81,6 +84,7 @@ function menu(){
|
||||
2 "Remove invites from user" \
|
||||
3 "Restart Webservice" \
|
||||
4 "Restart Sidekiq" \
|
||||
5 "Show admin password" \
|
||||
3>&1 1>&2 2>&3
|
||||
)
|
||||
|
||||
@ -130,6 +134,10 @@ function menu(){
|
||||
rm /tmp/mod_state
|
||||
menu
|
||||
;;
|
||||
5)
|
||||
showAdminPassword
|
||||
menu
|
||||
;;
|
||||
*)
|
||||
;;
|
||||
esac
|
||||
|
Loading…
Reference in New Issue
Block a user