2015-08-20 14:37:06 -06:00
|
|
|
#!/bin/bash
|
|
|
|
. ./lib
|
|
|
|
|
|
|
|
options=()
|
|
|
|
options+=("Bash" "")
|
|
|
|
options+=("Firewall" "")
|
|
|
|
options+=("Users" "")
|
|
|
|
options+=("Sudoers" "")
|
2018-09-15 16:20:14 -06:00
|
|
|
options+=("Systemd" "")
|
2015-11-01 13:53:45 -07:00
|
|
|
if [ -f /usr/bin/Xorg ]; then
|
|
|
|
options+=("XOrg" "")
|
|
|
|
fi
|
2019-01-02 16:10:33 -07:00
|
|
|
options+=("Boot" "")
|
2015-08-20 14:37:06 -06:00
|
|
|
|
|
|
|
defaultitem=""
|
|
|
|
sel=$(whiptail --backtitle "$apptitle" --title "Config 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
|
|
|
|
'Bash') menu config/bash/menu;;
|
|
|
|
'Firewall') menu config/firewall/menu;;
|
|
|
|
'Users') menu config/users/menu;;
|
|
|
|
'Sudoers') menu config/sudoers/menu;;
|
2018-09-15 16:20:14 -06:00
|
|
|
'Systemd') menu config/systemd/menu;;
|
2015-08-20 14:37:06 -06:00
|
|
|
'XOrg') menu config/xorg/menu;;
|
2019-01-02 16:10:33 -07:00
|
|
|
'Boot') menu config/boot/menu;;
|
2015-08-20 14:37:06 -06:00
|
|
|
esac
|
|
|
|
|
|
|
|
exit 0
|