Add accounts menu

This commit is contained in:
MatMoul 2019-01-03 00:16:10 +01:00
parent 9746f26135
commit 3b0dacdba6
4 changed files with 24 additions and 4 deletions

22
config/accounts/menu Normal file
View file

@ -0,0 +1,22 @@
#!/bin/bash
. ./lib
options=()
options+=("Users" "")
options+=("Sudoers" "")
defaultitem=""
sel=$(whiptail --backtitle "$apptitle" --title "Accounts Menu :" --menu "" --default-item "$defaultitem" --cancel-button "Back" 0 0 0 \
"${options[@]}" \
3>&1 1>&2 2>&3)
if [ ! "$?" = "0" ]; then
exit 1
fi
sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
'Users') menu config/accounts/users/menu;;
'Sudoers') menu config/accounts/sudoers/menu;;
esac
exit 0

View file

@ -4,8 +4,7 @@
options=()
options+=("Bash" "")
options+=("Firewall" "")
options+=("Users" "")
options+=("Sudoers" "")
options+=("Accounts" "")
options+=("Systemd" "")
if [ -f /usr/bin/Xorg ]; then
options+=("XOrg" "")
@ -24,8 +23,7 @@ sed -i "/^defaultitem=/c\defaultitem=\"$sel\"" $0
case $sel in
'Bash') menu config/bash/menu;;
'Firewall') menu config/firewall/menu;;
'Users') menu config/users/menu;;
'Sudoers') menu config/sudoers/menu;;
'Accounts') menu config/accounts/menu;;
'Systemd') menu config/systemd/menu;;
'XOrg') menu config/xorg/menu;;
'Boot') menu config/boot/menu;;