diff --git a/debian-config-jobs b/debian-config-jobs index 0e85ef1..200820f 100644 --- a/debian-config-jobs +++ b/debian-config-jobs @@ -878,6 +878,12 @@ function jobs () "BASH" ) if ! is_package_manager_running; then debconf-apt-progress -- apt-get purge -y armbian-zsh + BASHLOCATION=$(grep /bash$ /etc/shells | tail -1) + # change shell back to bash for future users + sed -i "s|^SHELL=.*|SHELL=${BASHLOCATION}|" /etc/default/useradd + sed -i "s|^DSHELL=.*|DSHELL=${BASHLOCATION}|" /etc/adduser.conf + # change to BASH shell for root and all normal users + awk -F'[/:]' '{if ($3 >= 1000 && $3 != 65534 || $3 == 0) print $1}' /etc/passwd | xargs -L1 chsh -s $(grep /bash$ /etc/shells | tail -1) if [[ -z $scripted ]]; then dialog --backtitle "$BACKTITLE" --title "Info" --colors --msgbox "\nYour default shell was switched to: \Z1BASH\Z0\n\nPlease logout & login from this session!" 9 47 fi diff --git a/debian-config-submenu b/debian-config-submenu index 7bdf75c..1b47fe2 100644 --- a/debian-config-submenu +++ b/debian-config-submenu @@ -84,7 +84,7 @@ while true; do LIST+=( "SSH" "Reconfigure SSH daemon" ) LIST+=( "Firmware" "Run apt update & apt upgrade" ) - if [[ "$SHELL" != "/bin/bash" ]]; then + if [[ "$SHELL" != *bash ]]; then LIST+=( "BASH" "Revert to stock BASH shell" ) else LIST+=( "ZSH" "Install ZSH with plugins and tmux" )