mirror of
https://github.com/armbian/config.git
synced 2026-01-06 09:53:35 -08:00
Remove deprecated functions from configurator, few bugfixes, desktop install
This commit is contained in:
@@ -139,18 +139,6 @@ function jobs ()
|
||||
;;
|
||||
|
||||
|
||||
# Install build essentials
|
||||
#
|
||||
"Development" )
|
||||
if [[ -n $(dpkg -l | grep build-essential) ]]; then
|
||||
debconf-apt-progress -- apt-get -y remove build-essential
|
||||
debconf-apt-progress -- apt-get -y autoremove
|
||||
else
|
||||
debconf-apt-progress -- apt-get -y install build-essential
|
||||
fi
|
||||
;;
|
||||
|
||||
|
||||
# Set the display resolution
|
||||
#
|
||||
"Display" )
|
||||
@@ -703,24 +691,29 @@ function jobs ()
|
||||
# Enable or disable desktop
|
||||
#
|
||||
"Desktop" )
|
||||
if [[ -n $(service lightdm status 2> /dev/null | grep -w active | grep -w running) || -n $(service nodm status | grep -w active | grep -w running) ]]; then
|
||||
if [[ -n $DISPLAY_MANAGER ]]; then
|
||||
dialog --title " Desktop is enabled and running " --backtitle "$BACKTITLE" \
|
||||
--yes-label "Stop" --no-label "Cancel" --yesno "\nDo you want to stop and disable this service?" 7 50
|
||||
exitstatus=$?;
|
||||
[[ $exitstatus = 0 ]] && service nodm stop && service lightdm stop && \
|
||||
[[ $exitstatus = 0 ]] && service nodm stop >/dev/null 2>&1 && service lightdm stop >/dev/null 2>&1 && \
|
||||
sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=false/" /etc/default/nodm
|
||||
else
|
||||
dialog --colors --title " Choose a display manager " --backtitle "$BACKTITLE" --help-button --help-label "Cancel" --yes-label "Lightdm" \
|
||||
--no-label "Nodm" --yesno "\n\Z1Lightdm\Z0 = full featured login display manager\n\Z1Nodm\Z0 = autoloading into desktop" 8 70
|
||||
exitstatus=$?;
|
||||
[[ $exitstatus = 0 ]] && [[ -f /etc/X11/default-display-manager ]] && \
|
||||
echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager && \
|
||||
debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install lightdm-gtk-greeter lightdm \
|
||||
&& systemctl start lightdm.service
|
||||
[[ $exitstatus = 1 ]] && [[ -f /etc/X11/default-display-manager ]] && \
|
||||
debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install nodm \
|
||||
&& echo "/usr/sbin/nodm" > /etc/X11/default-display-manager && \
|
||||
sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=true/" /etc/default/nodm && service nodm start
|
||||
if [[ -n $DESKTOP_INSTALLED ]]; then
|
||||
dialog --colors --title " Choose a display manager " --backtitle "$BACKTITLE" --help-button --help-label "Cancel" --yes-label "Lightdm" \
|
||||
--no-label "Nodm" --yesno "\n\Z1Lightdm\Z0 = full featured login display manager\n\Z1Nodm\Z0 = autoloading into desktop" 8 70
|
||||
exitstatus=$?;
|
||||
[[ $exitstatus = 0 ]] && [[ -f /etc/X11/default-display-manager ]] && \
|
||||
echo "/usr/sbin/lightdm" > /etc/X11/default-display-manager && \
|
||||
debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install lightdm-gtk-greeter lightdm \
|
||||
&& systemctl start lightdm.service
|
||||
[[ $exitstatus = 1 ]] && [[ -f /etc/X11/default-display-manager ]] && \
|
||||
debconf-apt-progress -- apt-get -o Dpkg::Options::="--force-confold" -y --no-install-recommends install nodm \
|
||||
&& echo "/usr/sbin/nodm" > /etc/X11/default-display-manager && \
|
||||
sed -i "s/^NODM_ENABLED=.*/NODM_ENABLED=true/" /etc/default/nodm && service nodm start
|
||||
else
|
||||
debconf-apt-progress -- apt-get update
|
||||
debconf-apt-progress -- apt-get -y install armbian-desktop
|
||||
fi
|
||||
fi
|
||||
;;
|
||||
|
||||
@@ -788,13 +781,6 @@ function jobs ()
|
||||
;;
|
||||
|
||||
|
||||
# Toggle running services
|
||||
#
|
||||
"Services" )
|
||||
rcconf
|
||||
;;
|
||||
|
||||
|
||||
# Toggle overlay items
|
||||
#
|
||||
"Hardware" )
|
||||
|
||||
@@ -611,6 +611,14 @@ while true; do
|
||||
|
||||
LIST=()
|
||||
|
||||
# detect desktop
|
||||
DISPLAY_MANAGER=""; DESKTOP_INSTALLED=""
|
||||
check_if_installed nodm && DESKTOP_INSTALLED="nodm";
|
||||
check_if_installed lightdm && DESKTOP_INSTALLED="lightdm";
|
||||
[[ -n $(service lightdm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="lightdm"
|
||||
[[ -n $(service nodm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="nodm"
|
||||
|
||||
|
||||
local mark=$(apt-mark showhold | grep -w "$BOARD")
|
||||
|
||||
[[ $(sed -n 's/^DEVNAME=//p' /sys/dev/block/$(mountpoint -d /)/uevent 2> /dev/null) == mmcblk* && -f /usr/sbin/nand-sata-install ]] \
|
||||
@@ -648,12 +656,14 @@ while true; do
|
||||
LIST+=( "Desktop" "Disable desktop" )
|
||||
[[ $DISPLAY_MANAGER == 'nodm' ]] && LIST+=( "Lightdm" "Switch to standard login manager" )
|
||||
[[ $DISPLAY_MANAGER == 'lightdm' ]] && LIST+=( "Nodm" "Switch to simple auto login manager" )
|
||||
elif [[ -n $DESKTOP_INSTALLED ]]; then
|
||||
LIST+=( "Desktop" "Enable desktop" )
|
||||
else
|
||||
if [[ -n $DESKTOP_INSTALLED ]]; then
|
||||
LIST+=( "Desktop" "Enable desktop" )
|
||||
else
|
||||
LIST+=( "Desktop" "Install desktop" )
|
||||
fi
|
||||
fi
|
||||
|
||||
|
||||
LIST+=( "Services" "Toggle running services" )
|
||||
if [[ "$DISTRO" == "Ubuntu" && "$(modinfo overlay > /dev/null 2>&1; echo $?)" == "0" ]]; then
|
||||
if [ -n "$(mount | grep -w tmpfs-root)" ]; then
|
||||
LIST+=( "Overlayroot" "Disable virtual read-only root filesystem" )
|
||||
@@ -850,11 +860,6 @@ while true; do
|
||||
|
||||
if [[ -n $(dpkg -l | grep linux-headers) ]]; then LIST+=( "Headers" "Remove kernel headers" ); else \
|
||||
LIST+=( "Headers" "Install kernel headers" ); fi
|
||||
if check_if_installed build-essential then ; then
|
||||
LIST+=( "Development" "Remove base development tools" );
|
||||
else
|
||||
LIST+=( "Development" "Install base development tools" );
|
||||
fi
|
||||
if [[ -n $DISPLAY_MANAGER ]]; then
|
||||
if [[ $(service xrdp status 2> /dev/null | grep -w active) ]]; then
|
||||
LIST+=( "RDP" "Disable remote desktop access from Windows" )
|
||||
@@ -899,12 +904,6 @@ BACKTITLE="Configuration utility, $ARMBIAN, https://www.armbian.com"
|
||||
TITLE="$BOARD_NAME "
|
||||
DEFAULT_ADAPTER=$(ip -4 route ls | grep default | grep -Po '(?<=dev )(\S+)')
|
||||
[[ -z "${DEFAULT_ADAPTER// }" ]] && DEFAULT_ADAPTER="lo"
|
||||
# detect desktop
|
||||
DISPLAY_MANAGER=""; DESKTOP_INSTALLED=""
|
||||
check_if_installed bluetooth nodm && DESKTOP_INSTALLED="nodm";
|
||||
check_if_installed bluetooth lightdm && DESKTOP_INSTALLED="lightdm";
|
||||
[[ -n $(service lightdm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="lightdm"
|
||||
[[ -n $(service nodm status 2> /dev/null | grep -w active) ]] && DISPLAY_MANAGER="nodm"
|
||||
OVERLAYDIR="/boot/dtb/overlay";
|
||||
[[ "$LINUXFAMILY" == "sunxi64" ]] && OVERLAYDIR="/boot/dtb/allwinner/overlay";
|
||||
dialog --backtitle "$BACKTITLE" --title "Please wait" --infobox "\nLoading Armbian configuration utility ... " 5 45
|
||||
|
||||
20
softy
20
softy
@@ -46,7 +46,7 @@ fi
|
||||
|
||||
# OMV
|
||||
OMV_STATUS="$(check_if_installed openmediavault && echo "on" || echo "off" )"
|
||||
[[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) && LIST_CONST=3
|
||||
[[ "$family" != "Ubuntu" ]] && LIST+=( "OMV" "OpenMediaVault NAS solution" "$OMV_STATUS" ) && LIST_CONST=5
|
||||
# MINIdlna
|
||||
MINIDLNA_STATUS="$(check_if_installed minidlna && echo "on" || echo "off" )"
|
||||
LIST+=( "Minidlna" "Lightweight DLNA/UPnP-AV server" "$MINIDLNA_STATUS" )
|
||||
@@ -62,9 +62,6 @@ LIST+=( "UrBackup" "Open Source client/server backup system" "$URBACKUP_STATUS"
|
||||
# ISPconfig
|
||||
ISPCONFIG_STATUS="$([[ -d /usr/local/ispconfig ]] && echo "on" || echo "off" )"
|
||||
LIST+=( "ISPConfig" "SMTP mail, IMAP, POP3 & LAMP/LEMP web server" "$ISPCONFIG_STATUS" )
|
||||
# Webmin
|
||||
WEBMIN_STATUS="$(check_if_installed webmin && echo "on" || echo "off" )"
|
||||
LIST+=( "Webmin" "Web-based interface for system administration" "$WEBMIN_STATUS" )
|
||||
}
|
||||
|
||||
function choose_webserver
|
||||
@@ -487,16 +484,6 @@ debconf-apt-progress -- apt-get -yy -f install
|
||||
}
|
||||
|
||||
|
||||
install_webmin (){
|
||||
#------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# Webmin http://www.webmin.com
|
||||
#------------------------------------------------------------------------------------------------------------------------------------------
|
||||
wget -q http://www.webmin.com/download/deb/webmin-current.deb -O ${TEMP_DIR}/package.deb
|
||||
dpkg -i ${TEMP_DIR}/package.deb
|
||||
debconf-apt-progress -- apt-get -yy -f install
|
||||
}
|
||||
|
||||
|
||||
install_transmission (){
|
||||
#------------------------------------------------------------------------------------------------------------------------------------------
|
||||
# transmission
|
||||
@@ -1234,11 +1221,6 @@ while true; do
|
||||
check_port 51413 "UrBackup"
|
||||
fi
|
||||
|
||||
if [[ "$selection" == *Webmin* && "$WEBMIN_STATUS" != "on" ]]; then
|
||||
install_webmin
|
||||
check_port 10000
|
||||
fi
|
||||
|
||||
# reread statuses
|
||||
check_status
|
||||
i=$[$i+1]
|
||||
|
||||
Reference in New Issue
Block a user