chore: Remove unused system and network files, removed readme from bin. started hot spot/ap featur,

This commit is contained in:
Tearran
2024-06-22 20:57:30 -07:00
parent 722fe9fbe7
commit bdda6e3b09
28 changed files with 835 additions and 1035 deletions

143
README.md
View File

@@ -8,88 +8,147 @@ Utility for configuring your board, divided into four main sections:
- Software - system and 3rd party software install.
To Configure and change global sytem settings, run the following command: `./armbian-configng`
***
## Screenshots
![edit-boot-env-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/448f0515-0854-4a8a-8421-53c8b72bb5c5)
![BT-connect-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/fef037ce-346d-4d70-9025-90f69fbdf5d3)
Following was updated on:
Fri Apr 12 01:33:08 AM MST 2024.
***
- ## **System**
- **S01** - Description: Enable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s01)
- **S02** - Description: Disable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s02)
- **S03** - Description: Edit the boot enviroment (WIP)
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s03)
- **S04** - Description: Install Linux headers
- Status: [Pending Review](https://github.com/armbian/config/wiki#System)
- **S05** - Description: Remove Linux headers
- Status: [Pending Review](https://github.com/armbian/config/wiki#System)
- ## **Network**
- **BT0** - Description: Install Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt0)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt0)
- **BT1** - Description: Remove Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt1)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt1)
- **BT3** - Description: Bluetooth Discover
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt3)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt3)
- **IR0** - Description: Install Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir0)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#ir0)
- **IR1** - Description: Uninstall Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir1)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#ir1)
- **N00** - Description: Manage wifi network connections
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n00)
- **N01** - Description: Advanced Edit /etc/network/interface
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n01)
- **N02** - Description: Disconect and forget all wifi connections (Advanced)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n02)
- **N03** - Description: Toggle system IPv6/IPv4 internet protical
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n03)
- ## **Localisation**
- **L00** - Description: Change Globla timezone (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l00)
- **L01** - Description: Change Locales reconfigure the language and charitorset
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l01)
- **L02** - Description: Change Keyboard layout
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l02)
- **L03** - Description: Change APT mirrors
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l03)
- ## **Software**
- **I00** - Description: Update Application Repository
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#i00)
- **I01** - Description: CLI System Monitor
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#i01)
- ## **Help**
- **H00** - Description: About This systme. (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#h00)
- **H02** - Description: List of Config function(WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#h02)
***
## Quick start
Run the following commands:
echo "deb [signed-by=/usr/share/keyrings/armbian.gpg] https://armbian.github.io/configng stable main" | sudo tee /etc/apt/sources.list.d/armbian-development.list > /dev/null
armbian-configng --dev
If all goes well you should see the Text-Based User Inerface (TUI)
## Development
Development test brances are available for testing. To clone the development branch, run the following commands:
To clone this development branch, run the following commands:
~~~
git clone https://github.com/armbian/configng.git
cd configng
git clone https://github.com/armbian/configng
cd configng
./armbian-configng --help
~~~
## Install latest release
dowload .deb package:
~~~
{
latest_release=$(curl -s https://api.github.com/repos/armbian/configng/releases/latest)
deb_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url')
curl -LO "$deb_url"
deb_file=$(echo "$deb_url" | awk -F"/" '{print $NF}')
sudo dpkg -i "$deb_file"
sudo dpkg --configure -a
sudo apt --fix-broken install
}
~~~
***
## CLI options
Command ine options.
Use:
~~~
armbian-config --help
~~~
Outputs:
~~~
Usage: armbian-configng [option] [arguments]
--help - Display this help message.
main=Help - Display Legacy Options (Backward Compatible)
--cli S01 - Enable Armbina kernal upgrades
--cli S02 - Disable Armbina kernal upgrades
--cli S03 - Edit the boot enviroment (WIP)
--cli S04 - Install Linux headers
--cli S05 - Remove Linux headers
--cli BT0 - Install Bluetooth support
--cli BT1 - Remove Bluetooth support
--cli BT3 - Bluetooth Discover
--cli IR0 - Install Infrared support
--cli IR1 - Uninstall Infrared support
--cli N00 - Manage wifi network connections
--cli N01 - Advanced Edit /etc/network/interface
--cli N02 - Disconect and forget all wifi connections (Advanced)
--cli N03 - Toggle system IPv6/IPv4 internet protical
--cli L00 - Change Globla timezone (WIP)
--cli L01 - Change Locales reconfigure the language and charitorset
--cli L02 - Change Keyboard layout
--cli L03 - Change APT mirrors
--cli I00 - Update Application Repository
--cli I01 - CLI System Monitor
~~~
## Legacy options
Backward Compatible options.
Use:
armbian-config main=Help
Outputs:
~~~
Legacy Options (Backward Compatible)
Please use 'armbian-config --help' for more information.
Usage: armbian-configng main=[arguments] selection=[options]
armbian-configng main=System selection=Headers - Install headers:
armbian-configng main=System selection=Headers_remove - Remove headers:
~~~

View File

@@ -1,100 +0,0 @@
# Armbian configuration utility
Utility for configuring your board, divided into four main sections:
- System - system and security settings,
- Network - wired, wireless, Bluetooth, access point,
- Personal - timezone, language, hostname,
- Software - system and 3rd party software install.
To Configure and change global sytem settings, run the following command: `./armbian-configng`
***
## Screenshots
![edit-boot-env-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/448f0515-0854-4a8a-8421-53c8b72bb5c5)
![BT-connect-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/fef037ce-346d-4d70-9025-90f69fbdf5d3)
Following was updated on:
Fri Apr 12 01:33:08 AM MST 2024.
***
- ## **System**
- **S01** - Description: Enable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s01)
- **S02** - Description: Disable Armbina kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s02)
- **S03** - Description: Edit the boot enviroment (WIP)
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s03)
- ## **Network**
- **BT0** - Description: Install Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt0)
- **BT1** - Description: Remove Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt1)
- **BT3** - Description: Bluetooth Discover
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt3)
- **IR0** - Description: Install Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir0)
- **IR1** - Description: Uninstall Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir1)
- **N00** - Description: Manage wifi network connections
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n00)
- **N01** - Description: Advanced Edit /etc/network/interface
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n01)
- **N02** - Description: Disconect and forget all wifi connections (Advanced)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n02)
- **N03** - Description: Toggle system IPv6/IPv4 internet protical
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n03)
- ## **Localisation**
- **L00** - Description: Change Globla timezone (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l00)
- **L01** - Description: Change Locales reconfigure the language and charitorset
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l01)
- **L02** - Description: Change Keyboard layout
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l02)
- **L03** - Description: Change APT mirrors
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l03)
- ## **Software**
- **I00** - Description: Update Application Repository
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i00)
- **I01** - Description: CLI System Monitor
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i01)
- ## **Help**
- **H00** - Description: About This systme. (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h00)
- **H02** - Description: List of Config function(WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h02)
***
## Quick start
Run the following commands:
echo "deb [signed-by=/usr/share/keyrings/armbian.gpg] https://armbian.github.io/configng stable main" | sudo tee /etc/apt/sources.list.d/armbian-development.list > /dev/null
armbian-configng --dev
If all goes well you should see the Text-Based User Inerface (TUI)
## Development
Development test brances are available for testing. To clone the development branch, run the following commands:
~~~
git clone https://github.com/armbian/configng.git
cd configng
~~~
## Note:
>
> The Bash procedures embedded within the JSON structure are meticulously designed with a focus on clear naming conventions and the simplicity of key pairs. These procedures serve multiple purposes, including facilitating the generation of content in various formats, such as Whiptail, Markdown, json out and others. Moreover, they are utilized for evaluation and execution of commands outlined in the JSON structure.
>

110
bin/armbian-configng Normal file → Executable file
View File

@@ -10,13 +10,6 @@ tput init
# allows CTRL c to exit
trap "exit" INT TERM
if [ "$1" == "-h" ] || [ "$1" == "--help" ]; then
# TODO : Add help message
echo -e "\nComming soon:\nsimple help meassage\n"
exit 0 ;
fi
# Get the script directory
script_dir="$(dirname "$0")"
@@ -44,38 +37,103 @@ declare -A module_options
#
# Load configng core functions and module options array
source "$lib_dir/config.ng.functions.sh"
set_runtime_variables
echo "Loaded Runtime variables..." | show_infobox ;
set_newt_colors 2
echo "Loaded Dialog..." | show_infobox ;
echo "Loaded Runtime variables..." #| show_infobox ;
#set_newt_colors 2
echo "Loaded Dialog..." #| show_infobox ;
source "$lib_dir/config.ng.docs.sh"
echo "Loaded Docs..." | show_infobox ;
echo "Loaded Docs..." #| show_infobox ;
source "$lib_dir/config.ng.network.sh"
echo "Loaded Network helpers..." | show_infobox ;
echo "Loaded Network helpers..." #| show_infobox ;
#
# Loads the varibles from beta armbian-config for runtime handeling
source "$lib_dir/config.ng.runtime.sh" ;
echo "Loaded Runtime conditions..." | show_infobox ;
#
# if not sudo
# Runtime "include this script" for USER and development setup condistion
if [[ $EUID != 0 ]]; then
source "$lib_dir/config.ng.runtime.dev.sh" ;
echo "Loaded Develoment
Runtime conditions..." | show_infobox ;
fi
echo "Loaded Runtime conditions..." #| show_infobox ;
clear
case "$1" in
"--dev")
if [[ $EUID != 0 ]]; then
source "$lib_dir/config.ng.runtime.dev.sh"
echo "Loaded Development Runtime conditions..." | show_infobox
fi
;;
"--help")
see_cli_list
exit 0
;;
"--doc")
if [[ $EUID != 0 ]]; then
generate_readme
exit 0
else
echo "Error: You must run this command as a normal user"
exit 1
fi
;;
"--cli")
shift
args=$(sanitize_input "$@")
execute_command "$args"
exit 0
;;
"main=help" | "main=Help")
see_cli_legacy
echo ""
exit 0
;;
"main="*)
cat << EOF
Legacy help commands are deprecated. May not work as expected.
Please use 'armbian-config --help' for more information.
tput clear
EOF
declare -A main_map
main_map=(
# map name to menu catagory
["System"]="S"
["Software"]="I"
["Network"]="N"
["Localisation"]="L"
)
main_value="${1#main=}"
main_value="${main_map[$main_value]}"
if [ -z "$main_value" ]; then
echo "Error: Invalid List $1"
exit 1
fi
declare -A select_map
# map name to menu number
select_map=(
["Headers"]="04"
["Headers_install"]="04"
["Headers_remove"]="05"
["Firmware"]="06"
["Nightly"]="07"
)
select_value="${2#selection=}"
select_value="${select_map[$select_value]}"
if [ -z "$select_value" ]; then
echo "Error: Invalid Option $2"
exit 1
fi
echo "$main_value""$select_value"
execute_command "$main_value""$select_value"
exit 0
;;
*)
if [[ $EUID != 0 ]]; then
echo -e "error: Exiting \nTry: 'sudo armbian-config'\n or: 'armbian-config --help' for More info\n\n"
exit 0
fi
;;
esac
#
# Generate the top menu with the modified Object data

View File

@@ -1,222 +0,0 @@
#!/bin/bash
# This script provides a command-line interface for managing Armbian configuration.
# It loads libraries of functions from the lib directory and displays them in a menu.
# The user can select a function to run, or use a text-based user interface (TUI) to navigate the menus.
# The script also provides a help option and a debug option for developers.
# The script requires sudo privileges to run some functions.
# The script uses whiptail or dialog for the TUI, depending on which is available.
#set -x
#set -e
#
# Enable Dynamic directory root use home ~/ , /bin , /usr/sbin etc..
bin="$(dirname "${BASH_SOURCE[0]}")"
directory="$(cd "$bin/../" && pwd )"
file_name="$(basename "${BASH_SOURCE[0]}")"
filename="${file_name%.*}"
libpath=$(cd "$directory/lib/$filename/" && pwd)
#sharepath=$(cd "$directory/share/${filename%-dev}/" && pwd)
#
# Consept Distribution Compatibility checks
check_distro() {
[[ -f "/usr/bin/${filename%%-*}-config" ]] && distro_config="${filename%%-*}"
[[ -f "/etc/${filename%%-*}-release" ]] && distro_release="${filename%%-*}"
# if both true then we are good to go
[[ -z "$distro_config" ]] || [[ -z "$distro_release" ]] && echo "W: Costum build, Tech support links are missing."
[[ -n "$distro_config" ]] && [[ -n "$distro_release" ]] && echo "I: This build seems to be community supported" | ./armbian-interface -o
[[ -f "/usr/sbin/${filename%%-*}-config" ]] && distro_config="${filename%%-*}"
[[ -f "/etc/${filename%%-*}-release" ]] && distro_release="${filename%%-*}"
}
[[ "$1" == "--dev" ]] && dev=1 && shift 1
#
# Check if the script is dev version.
suffix="${file_name##*-}"
if [[ "$suffix" == dev ]]; then
dev=1
check_distro #| armbian-interface -o
fi
if [[ "$(id -u)" != "0" ]] && [[ "$dev" == "1" ]] ; then
cat << EOF #| ./armbian-interface -o
I: Running in UX development mode
W: Admin functions will not work as expected
EOF
elif [[ "$(id -u)" == "0" ]] && [[ "$dev" == "1" ]] ; then
cat << EOF | ./armbian-interface -o
I: Running in UX development mode
W: Document files may need Admin privleges to edit/remove
EOF
fi
#
# Check if the script is being run as root
# UX Development mode bypasses root check, many functions will not work as expected
if [[ "$(id -u)" != "0" ]] && [[ "$dev" != "1" ]]; then
echo -e "E: This tool requires root privileges. Try: \"sudo $filename\"" >&2
exit 1
fi
declare -A dialogue
#
# Check if whiptail or dialog is installed and set the variable 'dialogue' accordingly.
# todo add a fallback TUI and GUI
if command -v whiptail &> /dev/null; then
dialogue="whiptail"
elif command -v dialog &> /dev/null; then
dialogue="dialog"
else
echo "TUI not found"
echo "Warning: Using fallback TUI"
sleep 1
clear && generate_read
fi
source "$libpath/functions.sh"
source "$libpath/documents.sh"
for file in "$libpath"/*/*.sh; do
source "$file"
done
#
# mapfile -t categories < <(ls -d "$libpath"/* )
mapfile -t categories < <(find "$libpath"/* -type d)
declare -A functions
for category in "${categories[@]}"; do
category_name="${category##*/}"
category_file="$category/readme.md"
if [[ -f "$category_file" ]]; then
category_description=$(grep -oP "(?<=# @description ).*" "$category_file")
fi
for file in "$category"/*.sh; do
description=""
while IFS= read -r line; do
if [[ $line =~ ^#\ @description\ (.*)$ ]]; then
description="${BASH_REMATCH[1]}"
elif [[ $line =~ ^function\ (.*::.*)\(\)\{$ ]]; then
# END: be15d9bcejpp
function_name="${BASH_REMATCH[1]}"
key="$category_name:${file##*/}:${function_name}"
functions["$key,function_name"]=$(echo "$function_name" | sed 's/.*:://')
functions["$key,group_name"]=$(echo "$function_name" | sed 's/::.*//')
functions["$key,description"]=$description
elif [[ $line =~ ^#\ @options\ (.*)$ ]]; then
functions["$key,options"]="${BASH_REMATCH[1]}"
fi
done < "$file"
functions["$key,category"]=$category_name
functions["$key,category_description"]=$category_description
done
done
#
# WIP: Check arguments for no flag options
# armbian-config --help
# Change to BASH: /usr/sbin/armbian-config main=System selection=BASH
handle_no_flag(){
if [[ "$1" == *"="* ]]; then
IFS='=' read -r key value <<< "$1"
function_name=$(parse_action "$key" "$value")
# Call the function using variable indirection
${function_name}
elif [[ "$1" == "help"* ]]; then
generate_list_cli
fi
}
#
# Check arguments for long flag options
# Help message related to the functions the back end
handle_long_flag(){
if [[ "$1" == "--help" ]]; then
generate_list_run
exit 0 ;
elif [[ "$1" == "--doc" ]]; then
generate_doc
exit 0 ;
fi
# WIP:
if [ "$1" == "--run" ]; then
shift # Shifts the arguments to the left, excluding the first argument ("-r")
group_name="$1" # Takes the first argument as the group name
shift 1 # Shifts the arguments again to exclude the group name
function_name=$(parse_action "$group_name" "$1")
if [ $? -eq 0 ]; then
# Call the function using variable indirection
${function_name}
fi
elif [ "$1" == "--help" ]; then
generate_list_run
exit
elif [ "$1" == "--test" ]; then
check_distro | armbian-interface -o && $1 > /dev/null
fi
}
#
# Check arguments for short flag options
# THe interface help message
handle_short_flag(){
if [ "$1" == "-h" ]; then
generate_help
exit 0 ;
# Generate a text-based user interface
elif [ "$1" == "-t" ] ; then
generate_read ; exit 0 ;
# Generate all doc files
elif [ "$1" == "-d" ] ; then
generate_doc ; exit 0 ;
elif [ "$1" == "-j" ] ; then
generate_json ; exit 0 ;
fi
}
case "$1" in
*"="*)
# Handle the case where $1 contains "="
handle_no_flag "$@"
;;
*"--"*)
# Handle the case where $1 starts with "--"
handle_long_flag "$@"
;;
*"-"*)
# Handle the case where $1 starts with "-"
handle_short_flag "$1"
;;
*)
handle_no_flag "$@"
# Handle the case where $1 does not match any of the above patterns
# You can add your code here
;;
esac
if [[ -z "$1" ]] ; then
while true; do
generate_tui ;
if [[ "$?" == "0" ]]; then
exit 0
fi
done
fi

View File

@@ -1,119 +0,0 @@
#!/bin/bash
#
# Copyright (c) 2023 Joseph C Turner
# All rights reserved.
#
# This script.
# demonstrates the compatibility of multiple interfaces for displaying menus or messages.
# It uses an array to set the options for all three menus (bash, whiptail, and dialog).
# The script checks if whiptail or dialog are available on the system and uses them to display the menu in a more user-friendly way.
# If neither of these programs is available, it falls back to using bash.
# while both are installed falls back to whiptail to display the menu.
# The user can override the default program by passing an argument when running the script:
#
# Redistribution and use in source and binary forms, with or without
# modification, are permitted provided that the following conditions are met:
#
# 1. Redistributions of source code must retain the above copyright
# notice, this list of conditions and the following disclaimer.
#
# 2. Redistributions in binary form must reproduce the above copyright
# notice, this list of conditions and the following disclaimer in the
# documentation and/or other materials provided with the distribution.
#
# THIS SOFTWARE IS PROVIDED BY THE COPYRIGHT HOLDERS AND CONTRIBUTORS "AS IS"
# AND ANY EXPRESS OR IMPLIED WARRANTIES, INCLUDING, BUT NOT LIMITED TO, THE
# IMPLIED WARRANTIES OF MERCHANTABILITY AND FITNESS FOR A PARTICULAR PURPOSE
# ARE DISCLAIMED. IN NO EVENT SHALL THE COPYRIGHT HOLDER OR CONTRIBUTORS BE
# LIABLE FOR ANY DIRECT, INDIRECT, INCIDENTAL, SPECIAL, EXEMPLARY, OR
# CONSEQUENTIAL DAMAGES (INCLUDING, BUT NOT LIMITED TO, PROCUREMENT OF
# SUBSTITUTE GOODS OR SERVICES; LOSS OF USE, DATA, OR PROFITS; OR BUSINESS
# INTERRUPTION) HOWEVER CAUSED AND ON ANY THEORY OF LIABILITY, WHETHER IN
# CONTRACT, STRICT LIABILITY, OR TORT (INCLUDING NEGLIGENCE OR OTHERWISE)
# ARISING IN ANY WAY OUT OF THE USE OF THIS SOFTWARE, EVEN IF ADVISED OF THE
# POSSIBILITY OF SUCH DAMAGE.
#
## DIRECTORY variable to the absolute path of the script's directory
# directory="$(dirname "$(readlink -f "$0")")"
filename=$(basename "${BASH_SOURCE[0]}")
## DIALOG variable to the absolute path of the script's directory
DIALOG="bash"
[[ -x "$(command -v dialog)" ]] && DIALOG="dialog"
[[ -x "$(command -v whiptail)" ]] && DIALOG="whiptail"
show_help(){
echo -e "\nUsage: [command] | ${filename%.*} [ -h | -m | -o ]"
echo "Options:"
echo " -h, Print this help."
echo ""
echo " -o, Opens an OK message Box"
echo ""
echo " -m, Opens an Menu select Box."
echo ""
echo " -p, Opens Popup message box. "
echo ""
exit 1;
}
show_message(){
# Read the input from the pipe continuously until there is no more input
input=""
while read -r line; do
input+="$line\n"
done
# Display the "OK" message box with the input data
[[ $DIALOG != "bash" ]] && $DIALOG --title "Message Box" --msgbox "$input" 0 0
[[ $DIALOG == "bash" ]] && echo -e "$input"
[[ $DIALOG == "bash" ]] && read -p -r "Press [Enter] to continue..." ; echo "" ; exit 1
}
show_popup(){
input=""
while read -r line; do
input+="$line\n"
done
[[ $DIALOG != "bash" ]] && $DIALOG --title "Popup Box" --infobox "$input" 0 0
[[ $DIALOG == "bash" ]] && echo -e "$input"
}
show_menu(){
# Get the input and convert it into an array of options
inpu_raw=$(cat)
# Remove the lines befor -h
input=$(echo "$inpu_raw" | sed 's/-\([a-zA-Z]\)/\1/' | grep '^ [a-zA-Z] ' | grep -v '\[')
options=()
while read -r line; do
package=$(echo "$line" | awk '{print $1}')
description=$(echo "$line" | awk '{$1=""; print $0}' | sed 's/^ *//')
options+=("$package" "$description")
done <<< "$input"
# Display the menu and get the user's choice
[[ $DIALOG != "bash" ]] && choice=$($DIALOG --title "Menu" --menu "Choose an option:" 0 0 9 "${options[@]}" 3>&1 1>&2 2>&3)
# Check if the user made a choice
if [ $? -eq 0 ]; then
echo "$choice"
else
echo "You cancelled."
fi
}
[[ $1 == "-m" ]] && show_menu ;
[[ $1 == "-o" ]] && show_message ;
[[ $1 == "-h" ]] && show_help ;
[[ $1 == "-p" ]] && show_popup ;
[[ -z "$*" ]] && show_help ;

View File

@@ -4,7 +4,7 @@
module_options+=(
["generate_readme,author"]="Joey Turner"
["generate_readme,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/documents.sh#L18"
["generate_readme,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L17"
["generate_readme,feature"]="generate_readme"
["generate_readme,desc"]="Generate Document files."
["generate_readme,example"]="generate_readme"
@@ -18,29 +18,26 @@ function generate_readme() {
# Get the current date
local current_date=$(date)
# setup doc folders
mkdir -p "$script_dir/../share/doc/armbian-configng"
# [[ ! -d "$script_dir/images" ]] && mkdir -p "$script_dir/images" && generate_svg > "$script_dir/images/logo.svg" ;
# [[ ! -f "$script_dir/images/logo.svg" ]] && generate_svg > "$script_dir/images/logo.svg" ;
echo "Sorting data\nUpdating documentation" | show_infobox ;
echo -e "Sorting data\nUpdating documentation" # current_date ;
######################################
# Generate the README.md file
echo "$(see_jobs_list)" > "$script_dir/README.md"
echo "Updating Readme.md" | show_infobox
echo "$(see_full_list)" > "$script_dir/../README.md"
echo "Updating Readme.md" # current_date
######################################
cp "$script_dir/README.md" "$doc_dir/Home.md"
cd "$script_dir" && cp ./README.md "../README.md"
echo "README.md has been updated." | show_infobox
cp "$script_dir/../README.md" "$doc_dir/Home.md"
echo "README.md has been updated." # current_date
######################################
echo "Updating WIKI Functions" | show_infobox
echo "Updating WIKI Functions" # current_date
cat << EOF > "$doc_dir/Functions.md"
# Helper functions
@@ -52,10 +49,10 @@ EOF
######################################
echo "Updating WIKI HowTo" | show_infobox
echo "Updating WIKI HowTo" # current_date
cat << EOF > "$doc_dir/Menu.md"
# Armbian-config Menu list.
# Menu list.
armbian-config jobs list.
$(see_jq_menu_list)
@@ -64,16 +61,39 @@ EOF
######################################
# show_infobox <<< $( echo "$(generate_json_options)" > "$script_dir/docs/config-helpers.json" )
# Print a message indicating that README.md has been updated
# echo "Documents have been updated." | show_infobox
echo "Updating WIKI Command line options" # current_date
cat << EOF > "$doc_dir/Command.md"
## CLI options
Command ine options.
Use:
armbian-config --help
Outputs:
~~~
$(see_cli_list)
~~~
## Legacy options
deprecated
Use:
armbian-config main=Help
Outputs:
~~~
$(see_cli_legacy)
~~~
EOF
}
module_options+=(
["serve_doc,author"]="Tearran"
["serve_doc,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L89"
["serve_doc,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L106"
["serve_doc,feature"]="serve_doc"
["serve_doc,desc"]="Serve the edit and debug server."
["serve_doc,example"]="serve_doc"
@@ -112,7 +132,7 @@ function serve_doc() {
module_options+=(
["see_use,author"]="Tearran"
["see_use,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L126"
["see_use,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L145"
["see_use,feature"]="see_use"
["see_use,desc"]="Show the usage of the functions."
["see_use,example"]="see_use"
@@ -141,7 +161,7 @@ function see_use() {
module_options+=(
["generate_json_options,author"]="Tearran"
["generate_json_options,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L149"
["generate_json_options,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L174"
["generate_json_options,feature"]="generate_json"
["generate_json_options,desc"]="Generate JSON-like object file."
["generate_json_options,example"]="generate_json"
@@ -195,7 +215,7 @@ echo "}"
module_options+=(
["generate_svg,author"]="Tearran"
["generate_svg,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#201"
["generate_svg,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L201"
["generate_svg,feature"]="generate_svg"
["generate_svg,desc"]="Generate 'Armbian CPU logo' SVG for docunment file."
["generate_svg,example"]="generate_svg"
@@ -220,7 +240,7 @@ EOF
module_options+=(
["generate_jobs_from_json,author"]="Tearran"
["generate_jobs_from_json,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L223"
["generate_jobs_from_json,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L253"
["generate_jobs_from_json,feature"]="generate_jobs_from_json"
["generate_jobs_from_json,desc"]="Generate jobs from JSON file."
["generate_jobs_from_json,example"]="generate_jobs_from_json"
@@ -268,7 +288,7 @@ done
}
function see_jobs_list() {
function see_full_list() {
cat << EOF
@@ -281,20 +301,9 @@ Utility for configuring your board, divided into four main sections:
- Software - system and 3rd party software install.
To Configure and change global sytem settings, run the following command: \`./armbian-configng\`
***
## Screenshots
![edit-boot-env-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/448f0515-0854-4a8a-8421-53c8b72bb5c5)
![BT-connect-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/fef037ce-346d-4d70-9025-90f69fbdf5d3)
Following was updated on:
$current_date.
***
EOF
# Use jq to parse the JSON
# Use jq to parse the JSON into markdown
menu_items=$(jq -r '.menu | length' "$json_file")
for (( i=0; i<$menu_items; i++ ))
@@ -331,22 +340,57 @@ EOF
cat << EOF
***
## Quick start
Run the following commands:
echo "deb [signed-by=/usr/share/keyrings/armbian.gpg] https://armbian.github.io/configng stable main" \
| sudo tee /etc/apt/sources.list.d/armbian-development.list > /dev/null
armbian-configng --dev
If all goes well you should see the Text-Based User Inerface (TUI)
## Development
Development test brances are available for testing. To clone the development branch, run the following commands:
To clone this development branch, run the following commands:
~~~
git clone https://github.com/armbian/configng.git
cd configng
git clone https://github.com/armbian/configng
cd configng
./armbian-configng --help
~~~
## Install latest release
dowload .deb package:
~~~
{
latest_release=\$(curl -s https://api.github.com/repos/armbian/configng/releases/latest)
deb_url=\$(echo "\$latest_release" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url')
curl -LO "\$deb_url"
deb_file=\$(echo "\$deb_url" | awk -F"/" '{print \$NF}')
sudo dpkg -i "\$deb_file"
sudo dpkg --configure -a
sudo apt --fix-broken install
}
~~~
***
## CLI options
Command ine options.
Use:
~~~
armbian-config --help
~~~
Outputs:
~~~
$(see_cli_list)
~~~
## Legacy options
Backward Compatible options.
Use:
armbian-config main=Help
Outputs:
~~~
$(see_cli_legacy)
~~~
@@ -358,6 +402,8 @@ cd configng
EOF
exit 0 ;
}
@@ -398,7 +444,7 @@ function see_function_table_md() {
module_options+=(
["see_jq_menu_list,author"]="Tearran"
["see_jq_menu_list,ref_link"]="https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L304"
["see_jq_menu_list,ref_link"]="https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L304"
["see_jq_menu_list,feature"]="see_jq_menu_list"
["see_jq_menu_list,desc"]="Generate a markdown list json objects using jq."
["see_jq_menu_list,example"]="see_jq_menu_list"
@@ -419,4 +465,74 @@ jq -r '
"\n~~~\n"
' $json_file
}
module_options+=(
["see_cli_list,author"]="Tearran"
["see_cli_list,ref_link"]=""
["see_cli_list,feature"]="see_cli_list"
["see_cli_list,desc"]="Generate a Help message for cli commands."
["see_cli_list,example"]="see_cli_list"
["see_cli_list,status"]="review"
["see_cli_list,doc_link"]=""
)
#
# See command line options
#
function see_cli_list() {
local script_name=$(basename "$0")
cat << EOF
Usage: $script_name [option] [arguments]
--help - Display this help message.
main=Help - Display Legacy Options (Backward Compatible)
EOF
# TODO: Migrate More features.
#echo " main=help - Display Legacy cli commands."
jq -r --arg script_name "$script_name" '
.menu[] |
.sub[] |
select(.id | startswith("H") | not) |
" --cli " + .id + " - " + .description
' $json_file
}
module_options+=(
["see_cli_legacy,author"]="Tearran"
["see_cli_legacy,ref_link"]=""
["see_cli_legacy,feature"]="see_cli_legacy"
["see_cli_legacy,desc"]="Generate a Help message legacy cli commands."
["see_cli_legacy,example"]="see_cli_legacy"
["see_cli_legacy,status"]="review"
["see_cli_legacy,doc_link"]=""
)
function see_cli_legacy() {
local script_name=$(basename "$0")
cat << EOF
Legacy Options (Backward Compatible)
Please use 'armbian-config --help' for more information.
Usage: $script_name main=[arguments] selection=[options]
EOF
cat << EOF
$script_name main=System selection=Headers - Install headers:
$script_name main=System selection=Headers_remove - Remove headers:
EOF
# TODO Migrate following features
# $script_name main=System selection=Firmware - Update, upgrade and reboot:
# $script_name main=System selection=Nightly - Switch to nightly builds:
# $script_name main=System selection=Stable - Switch to stable builds:
# $script_name main=System selection=Default - Install default desktop:
# $script_name main=System selection=ZSH - Change to ZSH:
# $script_name main=System selection=BASH - Change to BASH:
# $script_name main=System selection=Stable - Change to stable repository [branch=dev]:
# $script_name main=System selection=Nightly - Change to nightly repository [branch=dev]:
# $script_name main=Software selection=Source_install - Install kernel source:
# $script_name main=Software selection=Source_remove - Remove kernel source:
# $script_name main=Software selection=Avahi - Install Avahi mDNS/DNS-SD daemon:
}

View File

@@ -10,7 +10,7 @@ module_options+=(
["check_desktop,feature"]="check_desktop"
["check_desktop,desc"]="Migrated procedures from Armbian config."
["check_desktop,example"]="check_desktop"
["check_desktop,status"]="review"
["check_desktop,status"]="Active"
["check_desktop,doc_link"]=""
)
#
@@ -36,7 +36,7 @@ menu_options+=(
["get_headers_kernel,feature"]="get_headers_kernel"
["get_headers_kernel,desc"]="Migrated procedures from Armbian config."
["get_headers_kernel,example"]="get_headers_kernel"
["get_headers_kernel,status"]="review"
["get_headers_kernel,status"]="Active"
["get_headers_kernel,doc_link"]=""
)
#
@@ -61,7 +61,7 @@ module_options+=(
["set_header_remove,desc"]="Migrated procedures from Armbian config."
["set_header_remove,example"]="set_header_remove"
["set_header_remove,doc_link"]=""
["set_header_remove,status"]="review"
["set_header_remove,status"]="Active"
["set_header_remove,doc_ink"]=""
)
#
@@ -89,7 +89,7 @@ module_options+=(
["check_if_installed,feature"]="check_if_installed"
["check_if_installed,desc"]="Migrated procedures from Armbian config."
["check_if_installed,example"]="check_if_installed nano"
["check_if_installed,status"]="review"
["check_if_installed,status"]="Active"
)
#
# check dpkg status of $1 -- currently only 'not installed at all' case caught
@@ -112,7 +112,7 @@ module_options+=(
["is_package_manager_running,feature"]="is_package_manager_running"
["is_package_manager_running,desc"]="Migrated procedures from Armbian config."
["is_package_manager_running,example"]="is_package_manager_running"
["is_package_manager_running,status"]="review"
["is_package_manager_running,status"]="Active"
)
#
# check if package manager is doing something
@@ -135,7 +135,7 @@ module_options+=(
["set_runtime_variables,feature"]="set_runtime_variables"
["set_runtime_variables,desc"]="Run time varibales Migrated procedures from Armbian config."
["set_runtime_variables,example"]="set_runtime_variables"
["set_runtime_variables,status"]="review"
["set_runtime_variables,status"]="Active"
)
#
# gather info about the board and start with loading menu variables
@@ -185,7 +185,7 @@ module_options+=(
["set_safe_boot,feature"]="set_safe_boot"
["set_safe_boot,desc"]="Freeze/unhold Migrated procedures from Armbian config."
["set_safe_boot,example"]="set_safe_boot unhold or set_safe_boot freeze"
["set_safe_boot,status"]="review"
["set_safe_boot,status"]="Active"
)
#
# freeze/unhold packages
@@ -220,7 +220,7 @@ module_options+=(
["connect_bt_interface,feature"]="connect_bt_interface"
["connect_bt_interface,desc"]="Migrated procedures from Armbian config."
["connect_bt_interface,example"]="connect_bt_interface"
["connect_bt_interface,status"]="review"
["connect_bt_interface,status"]="Active"
)
#
# connect to bluetooth device
@@ -278,7 +278,7 @@ module_options+=(
["set_colors,desc"]="Change the background color of the terminal or dialoge box"
["set_colors,example"]="set_colors 0-7"
["set_colors,doc_link"]=""
["set_colors,status"]="review"
["set_colors,status"]="Active"
)
#
# Function to set the tui colors
@@ -357,7 +357,7 @@ module_options+=(
["generate_top_menu,desc"]="Build the main menu from a object"
["generate_top_menu,example"]="generate_top_menu 'json_data'"
["generate_top_menu,doc_link"]=""
["generate_top_menu,status"]="review"
["generate_top_menu,status"]="Active"
)
#
# Function to generate the main menu from a JSON object
@@ -407,7 +407,7 @@ module_options+=(
["generate_menu,desc"]="Generate a submenu from a parent_id"
["generate_menu,example"]="generate_menu 'parent_id'"
["generate_menu,doc_link"]=""
["generate_menu,status"]="review"
["generate_menu,status"]="Active"
)
#
# Function to generate the submenu
@@ -445,6 +445,7 @@ function generate_menu() {
# If it doesn't, execute the command
[[ -n "$debug" ]] && echo "$OPTION"
execute_command "$OPTION"
#show_message <<< "$OPTION"
fi
fi
@@ -460,7 +461,7 @@ module_options+=(
["execute_command,desc"]="Needed by generate_menu"
["execute_command,example"]=""
["execute_command,doc_link"]=""
["execute_command,status"]="review"
["execute_command,status"]="Active"
)
#
# Function to execute the command
@@ -484,7 +485,7 @@ module_options+=(
["show_message,desc"]="Display a message box"
["show_message,example"]="show_message <<< 'hello world' "
["show_message,doc_link"]="https://github.com/armbian/configng/wiki/interface"
["show_message,status"]="review"
["show_message,status"]="Active"
)
#
# Function to display a message box
@@ -510,7 +511,7 @@ module_options+=(
["show_infobox,desc"]="pipe line strings to a infobox "
["show_infobox,example"]="show_infobox <<< 'hello world' ; "
["show_infobox,doc_link"]=""
["show_infobox,status"]="review"
["show_infobox,status"]="Active"
)
#
# Function to display an infobox with a message
@@ -548,7 +549,7 @@ module_options+=(
["show_menu,desc"]="Display a menu from pipe"
["show_menu,example"]="show_menu <<< armbianmonitor -h ; "
["show_menu,doc_link"]=""
["show_menu,status"]="WIP"
["show_menu,status"]="Active"
)
#
#
@@ -586,10 +587,10 @@ module_options+=(
["get_user_continue,desc"]="Display a Yes/No dialog box and prosees continue/exit"
["get_user_continue,example"]="get_user_continue 'Do you wish to continue?' process_input"
["get_user_continue,doc_link"]=""
["get_user_continue,status"]="review"
["get_user_continue,status"]="Active"
)
#
# Function to display a Yes/No dialog box (WIP)
# Function to display a Yes/No dialog box
#
function get_user_continue() {
local message="$1"
@@ -609,7 +610,7 @@ menu_options+=(
["get_user_continue,feature"]="process_input"
["get_user_continue,desc"]="used to process the user's choice paired with get_user_continue"
["get_user_continue,example"]="get_user_continue 'Do you wish to continue?' process_input"
["get_user_continue,status"]="review"
["get_user_continue,status"]="Active"
["get_user_continue,doc_link"]=""
)
#
@@ -630,7 +631,7 @@ module_options+=(
["get_user_continue_secure,desc"]="Secure version of get_user_continue"
["get_user_continue_secure,example"]="get_user_continue_secure 'Do you wish to continue?' process_input"
["get_user_continue_secure,doc_link"]=""
["get_user_continue_secure,status"]="WIP"
["get_user_continue_secure,status"]="Active"
)
#
# Secure version of get_user_continue
@@ -641,9 +642,16 @@ function get_user_continue_secure() {
# Define a list of allowed functions
local allowed_functions=("process_input" "other_function")
# Check if the next_action is in the list of allowed functions
if [[ " ${allowed_functions[@]} " =~ " ${next_action} " ]]; then
found=0
for func in "${allowed_functions[@]}"; do
if [[ "$func" == "$next_action" ]]; then
found=1
break
fi
done
if [[ "$found" -eq 1 ]]; then
if $($DIALOG --yesno "$message" 10 80 3>&1 1>&2 2>&3); then
$next_action
else
@@ -665,7 +673,7 @@ module_options+=(
["see_ping,desc"]="Check the internet connection with fallback DNS"
["see_ping,example"]="see_ping"
["see_ping,doc_link"]=""
["see_ping,status"]="review"
["see_ping,status"]="Active"
)
#
# Function to check the internet connection
@@ -700,7 +708,7 @@ module_options+=(
["see_current_apt,desc"]="Check when apt list was last updated"
["see_current_apt,example"]="see_current_apt"
["see_current_apt,doc_link"]=""
["see_current_apt,status"]="review"
["see_current_apt,status"]="Active"
)
#
# Function to check when the package list was last updated
@@ -737,3 +745,83 @@ see_current_apt() {
return 1 # The package lists are not up-to-date
fi
}
module_options+=(
["Headers_install,author"]="https://github.com/Tearran"
["Headers_install,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L160"
["Headers_install,feature"]="Headers_install"
["Headers_install,desc"]="Install kernel headers"
["Headers_install,example"]="if ! is_package_manager_running; then, if [[ -f /etc/armbian-release ]]; then, INSTALL_PKG="linux-headers-${BRANCH}-${LINUXFAMILY}";, else, INSTALL_PKG="linux-headers-$(uname -r | sed 's/'-$(dpkg --print-architecture)'//')";, fi, debconf-apt-progress -- apt-get -y install ${INSTALL_PKG},fi"
["Headers_install,status"]="Pending Review"
["Headers_install,doc_link"]="https://github.com/armbian/config/wiki#System"
)
#
# @description Install kernel headers
#
function Headers_install () {
if ! is_package_manager_running; then
if [[ -f /etc/armbian-release ]]; then
INSTALL_PKG="linux-headers-${BRANCH}-${LINUXFAMILY}";
else
INSTALL_PKG="linux-headers-$(uname -r | sed 's/'-$(dpkg --print-architecture)'//')";
fi
debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}
fi
}
module_options+=(
["Headers_remove,author"]="https://github.com/Tearran"
["Headers_remove,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L160"
["Headers_remove,feature"]="Headers_remove"
["Headers_remove,desc"]="Remove Linux headers"
["Headers_remove,example"]="if ! is_package_manager_running; then, REMOVE_PKG="linux-headers-*", if [[ -n $(dpkg -l | grep linux-headers) ]]; then, debconf-apt-progress -- apt-get -y purge ${REMOVE_PKG}, rm -rf /usr/src/linux-headers*, else, debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}, fi, # cleanup, apt clean, debconf-apt-progress -- apt -y autoremove,fi"
["Headers_remove,status"]="Pending Review"
["Headers_remove,doc_link"]="https://github.com/armbian/config/wiki#System"
)
#
# @description Remove Linux headers
#
function Headers_remove () {
if ! is_package_manager_running; then
REMOVE_PKG="linux-headers-*"
if [[ -n $(dpkg -l | grep linux-headers) ]]; then
debconf-apt-progress -- apt-get -y purge ${REMOVE_PKG}
rm -rf /usr/src/linux-headers*
else
debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}
fi
# cleanup
apt clean
debconf-apt-progress -- apt -y autoremove
fi
}
module_options+=(
["sanitize_input,author"]="https://github.com/Tearran"
["sanitize_input,ref_link"]="https://github.com/armbian/config/blob/master/debian-config-jobs#L160"
["sanitize_input,feature"]="Headers_remove"
["sanitize_input,desc"]="Remove Linux headers"
["sanitize_input,example"]="if ! is_package_manager_running; then, REMOVE_PKG=\"linux-headers-*\", if [[ -n $(dpkg -l | grep linux-headers) ]]; then, debconf-apt-progress -- apt-get -y purge ${REMOVE_PKG}, rm -rf /usr/src/linux-headers*, else, debconf-apt-progress -- apt-get -y install ${INSTALL_PKG}, fi, # cleanup, apt clean, debconf-apt-progress -- apt -y autoremove,fi"
["sanitize_input,status"]="Pending Review"
["sanitize_input,doc_link"]="https://github.com/armbian/config/wiki#System"
)
#
# sanitize input cli
#
sanitize_input() {
local sanitized_input=()
for arg in "$@"; do
if [[ $arg =~ ^[a-zA-Z0-9_=]+$ ]]; then
sanitized_input+=("$arg")
else
echo "Invalid argument: $arg"
exit 1
fi
done
echo "${sanitized_input[@]}"
}

View File

@@ -9,11 +9,10 @@
"id": "S01",
"description": "Enable Armbina kernal upgrades",
"command": [
"get_user_continue \"This will allow apt to update boot critical items\n\n Continue?\" process_input",
"set_safe_boot unhold"
"set_safe_boot unhold"
],
"show": true,
"status": "WIP",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -22,11 +21,10 @@
"id": "S02",
"description": "Disable Armbina kernal upgrades",
"command": [
"get_user_continue \"This will apt hold boot critical items\n\n Continue?\" process_input",
"set_safe_boot freeze"
],
"show": true,
"status": "WIP",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -39,10 +37,34 @@
"nano /boot/armbianEnv.txt"
],
"show": true,
"status": "WIP",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
},
{
"id": "S04",
"description": "Install Linux headers",
"command": [
"Headers_install"
],
"show": true,
"status": "Pending Review",
"doc_link": "https://github.com/armbian/config/wiki#System",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L160",
"author": "https://github.com/Tearran"
},
{
"id": "S05",
"description": "Remove Linux headers",
"command": [
"Headers_remove"
],
"show": true,
"status": "Pending Review",
"doc_link": "https://github.com/armbian/config/wiki#System",
"src_reference": "https://github.com/armbian/config/blob/master/debian-config-jobs#L160",
"author": "https://github.com/Tearran"
}
]
},
@@ -60,7 +82,7 @@
"check_if_installed xserver-xorg && debconf-apt-progress -- apt-get -y --no-install-recommends install pulseaudio-module-bluetooth blueman"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -75,7 +97,7 @@
"debconf-apt-progress -- apt -y -qq autoremove"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -88,7 +110,7 @@
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -100,7 +122,7 @@
"see_current_apt; debconf-apt-progress -- apt-get -y --no-install-recommends install lirc"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -112,7 +134,7 @@
"see_current_apt; debconf-apt-progress -- apt-get -y --no-install-recommends install lirc"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -124,7 +146,7 @@
"nmtui connect"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -137,7 +159,7 @@
"nano /etc/network/interfaces"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -151,7 +173,7 @@
"do nmcli con delete uuid $line; done > /dev/null"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -164,7 +186,20 @@
"toggle_ipv6 | show_infobox"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
},
{
"id": "N04",
"description": "(WIP) Setup Hotspot?Access point",
"command": [
"get_user_continue \"This operation will install necessary software and add configuration files.\nDo you wish to continue?\" process_input",
"hotspot_setup"
],
"show": false,
"status": "WIP",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -183,7 +218,7 @@
"dpkg-reconfigure tzdata"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -197,7 +232,7 @@
"export LANGUAGE=$LANG"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -209,7 +244,7 @@
"dpkg-reconfigure keyboard-configuration ; setupcon "
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -221,7 +256,7 @@
"get_user_continue \"This is only a frontend test\" process_input"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -241,7 +276,7 @@
"debconf-apt-progress -- apt update"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -253,7 +288,7 @@
"armbianmonitor -m | show_infobox"
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -272,7 +307,7 @@
"show_message <<< \"This app is to help exicute prosedures to configure your system\n\nSome option may not work on manualy modified sytemes\""
],
"show": true,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""
@@ -284,7 +319,7 @@
"show_message <<< see_use"
],
"show": false,
"status": "review",
"status": "Active",
"doc_link": "",
"src_reference": "",
"author": ""

View File

@@ -106,3 +106,112 @@ function see_ping() {
}
module_options+=(
["hotspot_setup,author"]="Joey Turner"
["hotspot_setup,ref_link"]=""
["hotspot_setup,feature"]="hotspot_setup"
["hotspot_setup,desc"]="Set up a WiFi hotspot on the device"
["hotspot_setup,example"]="hotspot_setup"
["hotspot_setup,status"]="review"
["hotspot_setup,doc_link"]=""
)
# Function to display an error message and exit
function error_exit {
whiptail --msgbox "$1" 8 40
exit 1
}
function hotspot_setup() {
# Ensure the script is run as root
if [[ $EUID -ne 0 ]]; then
error_exit "This script must be run as root."
fi
# Gather SSID and passphrase for the hotspot
SSID=$(whiptail --inputbox "Enter SSID for the Hotspot:" 8 40 3>&1 1>&2 2>&3)
if [ $? -ne 0 ]; then
error_exit "SSID input cancelled."
fi
PASSPHRASE=$(whiptail --passwordbox "Enter Passphrase for the Hotspot:" 8 40 3>&1 1>&2 2>&3)
if [ $? -ne 0 ]; then
error_exit "Passphrase input cancelled."
fi
# Confirm SSID and Passphrase
whiptail --msgbox "SSID: $SSID\nPassphrase: $PASSPHRASE" 8 40
# Update and install necessary packages
apt update
apt install -y hostapd dnsmasq
# Stop services while configuring
systemctl stop hostapd
systemctl stop dnsmasq
# Configure hostapd
cat > /etc/hostapd/hostapd.conf <<EOL
interface=wlan1
driver=nl80211
ssid=$SSID1
hw_mode=g
channel=7
wmm_enabled=0
macaddr_acl=0
auth_algs=1
ignore_broadcast_ssid=0
wpa=2
wpa_passphrase=$PASSPHRASE
wpa_key_mgmt=WPA-PSK
wpa_pairwise=TKIP
rsn_pairwise=CCMP
EOL
# Point hostapd to the configuration file
sed -i 's|#DAEMON_CONF=""|DAEMON_CONF="/etc/hostapd/hostapd.conf"|' /etc/default/hostapd
# Configure dnsmasq
mv /etc/dnsmasq.conf /etc/dnsmasq.conf.orig
cat > /etc/dnsmasq.conf <<EOL
interface=wlan1
dhcp-range=192.168.50.10,192.168.50.50,12h
EOL
# Configure the network interfaces
cat >> /etc/network/interfaces <<EOL
allow-hotplug wlan1
iface wlan1 inet static
address 192.168.50.1
netmask 255.255.255.0
EOL
# Enable IP forwarding
sed -i 's|#net.ipv4.ip_forward=1|net.ipv4.ip_forward=1|' /etc/sysctl.conf
sysctl -p
# Set up NAT
iptables -t nat -A POSTROUTING -o wlan0 -j MASQUERADE
sh -c "iptables-save > /etc/iptables.ipv4.nat"
# Ensure iptables rule is loaded on boot
cat > /etc/rc.local <<EOL
#!/bin/sh -e
iptables-restore < /etc/iptables.ipv4.nat
exit 0
EOL
chmod +x /etc/rc.local
# Start services
systemctl start hostapd
systemctl start dnsmasq
# Enable services on boot
systemctl enable hostapd
systemctl enable dnsmasq
whiptail --msgbox "Hotspot setup complete. Rebooting now." 8 40
reboot
}

View File

@@ -35,11 +35,4 @@ if [[ "$1" == "dev" || "$1" == "--dev" ]]; then
elif [[ "$1" == "--docs" ]]; then
generate_readme
exit 0
elif [[ "$1" == "--help" ]]; then
see_use
exit 0
else
# exit admin tool
echo -e "error: Exiting \nTry: 'sudo armbian-config'\n or: 'armbian-config --help' for More info\n\n"
exit 0
fi

View File

@@ -1,3 +0,0 @@
# @description Network Wired wireless Bluetooth access point

View File

@@ -1,19 +0,0 @@
#!/bin/bash
# Copyright (c) Authors: http://www.armbian.com/authors, info@armbian.com
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
# @description Network Manager.
#
# @exitcode 0 If successful.
#
# @options none
function network::NMTUI(){
nmtui connect
return 0
}

View File

@@ -1,21 +0,0 @@
#!/bin/bash
#
# Copyright (c) Authors: http://www.armbian.com/authors, info@armbian.com
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
# @description Armbian installer
#
# @exitcode 0 If successful.
#
# @options none.
#
function system::Install(){
armbian-install
return 0
}

View File

@@ -1,21 +0,0 @@
#!/bin/bash
#
# Copyright (c) Authors: http://www.armbian.com/authors, info@armbian.com
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
# @description Hello System.
#
# @exitcode 0 If successful.
#
# @options none.
#
function system::Hello(){
echo "Hello Armbian"
return 0
}

View File

@@ -1,2 +0,0 @@
# @description System and Security

View File

@@ -1,45 +0,0 @@
#!/bin/bash
# Copyright (c) Authors: http://www.armbian.com/authors, info@armbian.com
#
# This file is licensed under the terms of the GNU General Public
# License version 2. This program is licensed "as is" without any
# warranty of any kind, whether express or implied.
# @description Armbian Monitor and Benchmarking.
#
# @exitcode 0 If successful.
#
# @options none
function monitor::Benchmarking(){
see_menu #| armbian-interface -o
return 0 ;
}
see_menu(){
# Define the script
script="$(which armbianmonitor)"
# Run the script with the -h option and save the output to a variable
help_message=$("$script" -h ) || exit 2
# Reformat the help message into an array line by line
readarray -t script_launcher < <(echo "$help_message" | sed 's/-\([a-zA-Z]\)/\1/' | grep '^ [a-zA-Z] ' | grep -v '\[')
# Loop through each line in the array and create a menu string
menu_string=""
for line in "${script_launcher[@]}"; do
# Append the formatted line to the menu string
if [[ "$line" != " d "* ]] && [[ "$line" != " c "* ]]; then
menu_string+="$line\n"
fi
done
# Use the get_help_msg function and pipe its output into configng-interface -m
selected_option=$(echo -e "$menu_string" | armbian-interface -m)
# Run the armbian-monitor script with the selected option
[[ -n "$selected_option" ]] && "$script" -"$selected_option";
}

View File

@@ -0,0 +1,54 @@
## CLI options
Command ine options.
Use:
armbian-config --help
Outputs:
~~~
Usage: armbian-configng [option] [arguments]
--help - Display this help message.
main=Help - Display Legacy Options (Backward Compatible)
--cli S01 - Enable Armbina kernal upgrades
--cli S02 - Disable Armbina kernal upgrades
--cli S03 - Edit the boot enviroment (WIP)
--cli S04 - Install Linux headers
--cli S05 - Remove Linux headers
--cli BT0 - Install Bluetooth support
--cli BT1 - Remove Bluetooth support
--cli BT3 - Bluetooth Discover
--cli IR0 - Install Infrared support
--cli IR1 - Uninstall Infrared support
--cli N00 - Manage wifi network connections
--cli N01 - Advanced Edit /etc/network/interface
--cli N02 - Disconect and forget all wifi connections (Advanced)
--cli N03 - Toggle system IPv6/IPv4 internet protical
--cli L00 - Change Globla timezone (WIP)
--cli L01 - Change Locales reconfigure the language and charitorset
--cli L02 - Change Keyboard layout
--cli L03 - Change APT mirrors
--cli I00 - Update Application Repository
--cli I01 - CLI System Monitor
~~~
## Legacy options
deprecated
Use:
armbian-config main=Help
Outputs:
~~~
Legacy Options (Backward Compatible)
Please use 'armbian-config --help' for more information.
Usage: armbian-configng main=[arguments] selection=[options]
armbian-configng main=System selection=Headers - Install headers:
armbian-configng main=System selection=Headers_remove - Remove headers:
~~~

View File

@@ -4,32 +4,37 @@ A list of the heper function ie bash prosedures used in Jobs file.
| Feature | Description | Credit | Reference | Documents | Status |
|:------- | ----------- | ----------- |:---------:|:---------:|:------:|
| set_runtime_variables | Run time varibales Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L136) | X | review |
| see_cli_legacy | Generate a Help message legacy cli commands. | Tearran | X | X | source link Needed |
| set_runtime_variables | Run time varibales Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L136) | X | Active |
| see_function_table_md | Generate this markdown table of all module_options | Tearran | X | X | source link Needed |
| show_menu | Display a menu from pipe | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L550) | X | WIP |
| generate_top_menu | Build the main menu from a object | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L370) | X | review |
| is_package_manager_running | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L111) | X | review |
| check_desktop | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L16) | X | review |
| generate_readme | Generate Document files. | Joey Turner | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/documents.sh#L18) | X | review |
| execute_command | Needed by generate_menu | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L464) | X | review |
| get_user_continue | Display a Yes/No dialog box and prosees continue/exit | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L588) | X | review |
| show_menu | Display a menu from pipe | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L550) | X | Active |
| generate_top_menu | Build the main menu from a object | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L370) | X | Active |
| is_package_manager_running | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L111) | X | Active |
| check_desktop | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L16) | X | Active |
| generate_readme | Generate Document files. | Joey Turner | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L17) | X | review |
| execute_command | Needed by generate_menu | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L464) | X | Active |
| get_user_continue | Display a Yes/No dialog box and prosees continue/exit | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L588) | X | Active |
| show_message | Display a message box | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#486) | [Document](https://github.com/armbian/configng/wiki/interface) | Review |
| connect_bt_interface | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L221) | X | review |
| set_safe_boot | Freeze/unhold Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L188) | X | review |
| see_current_apt | Check when apt list was last updated | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#667) | X | review |
| check_if_installed | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L88) | X | review |
| generate_svg | Generate 'Armbian CPU logo' SVG for docunment file. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#201) | X | review |
| connect_bt_interface | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L221) | X | Active |
| set_safe_boot | Freeze/unhold Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L188) | X | Active |
| see_current_apt | Check when apt list was last updated | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#667) | X | Active |
| check_if_installed | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L88) | X | Active |
| generate_svg | Generate 'Armbian CPU logo' SVG for docunment file. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L201) | X | review |
| Headers_remove | Remove Linux headers | https://github.com/Tearran | [Source](https://github.com/armbian/config/blob/master/debian-config-jobs#L160) | [Document](https://github.com/armbian/config/wiki#System) | Review |
| Headers_remove | Remove Linux headers | https://github.com/Tearran | [Source](https://github.com/armbian/config/blob/master/debian-config-jobs#L160) | [Document](https://github.com/armbian/config/wiki#System) | Review |
| check_ip_version | Check if a domain is reachable via IPv4 and IPv6 | Joey Turner | X | X | source link Needed |
| set_header_remove | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L64) | X | review |
| generate_menu | Generate a submenu from a parent_id | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L416) | X | review |
| see_jq_menu_list | Generate a markdown list json objects using jq. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L304) | X | review |
| generate_jobs_from_json | Generate jobs from JSON file. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L223) | X | review |
| set_header_remove | Migrated procedures from Armbian config. | Igor Pecovnik | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L64) | X | Active |
| generate_menu | Generate a submenu from a parent_id | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L416) | X | Active |
| see_jq_menu_list | Generate a markdown list json objects using jq. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L304) | X | review |
| generate_jobs_from_json | Generate jobs from JSON file. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L253) | X | review |
| Headers_install | Install kernel headers | https://github.com/Tearran | [Source](https://github.com/armbian/config/blob/master/debian-config-jobs#L160) | [Document](https://github.com/armbian/config/wiki#System) | Review |
| toggle_ipv6 | Toggle IPv6 on or off | Joey Turner | X | X | source link Needed |
| generate_json | Generate JSON-like object file. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L149) | X | review |
| set_colors | Change the background color of the terminal or dialoge box | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L287) | X | review |
| serve_doc | Serve the edit and debug server. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L89) | X | review |
| show_infobox | pipe line strings to a infobox | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#512) | X | review |
| see_use | Show the usage of the functions. | Tearran | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L126) | X | review |
| see_cli_list | Generate a Help message for cli commands. | Tearran | X | X | source link Needed |
| generate_json | Generate JSON-like object file. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L174) | X | review |
| set_colors | Change the background color of the terminal or dialoge box | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#L287) | X | Active |
| serve_doc | Serve the edit and debug server. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L106) | X | review |
| show_infobox | pipe line strings to a infobox | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#512) | X | Active |
| see_use | Show the usage of the functions. | Tearran | [Source](https://github.com/armbian/configng/blob/main/lib/armbian-configng/config.ng.functions.sh#L145) | X | review |
| see_ping | Check the internet connection with fallback DNS | Joey Turner | [Source](https://github.com/Tearran/configng/blob/main/config.ng.functions.sh#632) | X | review |
| get_user_continue_secure | Secure version of get_user_continue | Joey Turner | X | X | source link Needed |

View File

@@ -8,88 +8,147 @@ Utility for configuring your board, divided into four main sections:
- Software - system and 3rd party software install.
To Configure and change global sytem settings, run the following command: `./armbian-configng`
***
## Screenshots
![edit-boot-env-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/448f0515-0854-4a8a-8421-53c8b72bb5c5)
![BT-connect-2024-04-03 10-06-58](https://github.com/armbian/configng/assets/2831630/fef037ce-346d-4d70-9025-90f69fbdf5d3)
Following was updated on:
Fri Apr 12 01:33:08 AM MST 2024.
***
- ## **System**
- **S01** - Description: Enable Armbian kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s01)
- **S02** - Description: Disable Armbian kernal upgrades
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s02)
- **S01** - Description: Enable Armbina kernal upgrades
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s01)
- **S02** - Description: Disable Armbina kernal upgrades
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s02)
- **S03** - Description: Edit the boot enviroment (WIP)
- Status: [WIP](https://github.com/armbian/configng/wiki/Menu#s03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#s03)
- **S04** - Description: Install Linux headers
- Status: [Pending Review](https://github.com/armbian/config/wiki#System)
- **S05** - Description: Remove Linux headers
- Status: [Pending Review](https://github.com/armbian/config/wiki#System)
- ## **Network**
- **BT0** - Description: Install Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt0)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt0)
- **BT1** - Description: Remove Bluetooth support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt1)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt1)
- **BT3** - Description: Bluetooth Discover
- Status: [review](https://github.com/armbian/configng/wiki/Menu#bt3)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#bt3)
- **IR0** - Description: Install Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir0)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#ir0)
- **IR1** - Description: Uninstall Infrared support
- Status: [review](https://github.com/armbian/configng/wiki/Menu#ir1)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#ir1)
- **N00** - Description: Manage wifi network connections
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n00)
- **N01** - Description: Advanced Edit /etc/network/interface
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n01)
- **N02** - Description: Disconect and forget all wifi connections (Advanced)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n02)
- **N03** - Description: Toggle system IPv6/IPv4 internet protical
- Status: [review](https://github.com/armbian/configng/wiki/Menu#n03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#n03)
- ## **Localisation**
- **L00** - Description: Change Global timezone (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l00)
- **L01** - Description: Change Locales reconfigure the language and character set
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l01)
- **L00** - Description: Change Globla timezone (WIP)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l00)
- **L01** - Description: Change Locales reconfigure the language and charitorset
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l01)
- **L02** - Description: Change Keyboard layout
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l02)
- **L03** - Description: Change APT mirrors
- Status: [review](https://github.com/armbian/configng/wiki/Menu#l03)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#l03)
- ## **Software**
- **I00** - Description: Update Application Repository
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i00)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#i00)
- **I01** - Description: CLI System Monitor
- Status: [review](https://github.com/armbian/configng/wiki/Menu#i01)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#i01)
- ## **Help**
- **H00** - Description: About This system. (WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h00)
- **H00** - Description: About This systme. (WIP)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#h00)
- **H02** - Description: List of Config function(WIP)
- Status: [review](https://github.com/armbian/configng/wiki/Menu#h02)
- Status: [Active](https://github.com/armbian/configng/wiki/Menu#h02)
***
## Quick start
Run the following commands:
echo "deb [signed-by=/usr/share/keyrings/armbian.gpg] https://armbian.github.io/configng stable main" | sudo tee /etc/apt/sources.list.d/armbian-development.list > /dev/null
armbian-configng --dev
If all goes well you should see the Text-Based User Inerface (TUI)
## Development
Development test brances are available for testing. To clone the development branch, run the following commands:
To clone this development branch, run the following commands:
~~~
git clone https://github.com/armbian/configng.git
cd configng
git clone https://github.com/armbian/configng
cd configng
./armbian-configng --help
~~~
## Install latest release
dowload .deb package:
~~~
{
latest_release=$(curl -s https://api.github.com/repos/armbian/configng/releases/latest)
deb_url=$(echo "$latest_release" | jq -r '.assets[] | select(.name | endswith(".deb")) | .browser_download_url')
curl -LO "$deb_url"
deb_file=$(echo "$deb_url" | awk -F"/" '{print $NF}')
sudo dpkg -i "$deb_file"
sudo dpkg --configure -a
sudo apt --fix-broken install
}
~~~
***
## CLI options
Command ine options.
Use:
~~~
armbian-config --help
~~~
Outputs:
~~~
Usage: armbian-configng [option] [arguments]
--help - Display this help message.
main=Help - Display Legacy Options (Backward Compatible)
--cli S01 - Enable Armbina kernal upgrades
--cli S02 - Disable Armbina kernal upgrades
--cli S03 - Edit the boot enviroment (WIP)
--cli S04 - Install Linux headers
--cli S05 - Remove Linux headers
--cli BT0 - Install Bluetooth support
--cli BT1 - Remove Bluetooth support
--cli BT3 - Bluetooth Discover
--cli IR0 - Install Infrared support
--cli IR1 - Uninstall Infrared support
--cli N00 - Manage wifi network connections
--cli N01 - Advanced Edit /etc/network/interface
--cli N02 - Disconect and forget all wifi connections (Advanced)
--cli N03 - Toggle system IPv6/IPv4 internet protical
--cli L00 - Change Globla timezone (WIP)
--cli L01 - Change Locales reconfigure the language and charitorset
--cli L02 - Change Keyboard layout
--cli L03 - Change APT mirrors
--cli I00 - Update Application Repository
--cli I01 - CLI System Monitor
~~~
## Legacy options
Backward Compatible options.
Use:
armbian-config main=Help
Outputs:
~~~
Legacy Options (Backward Compatible)
Please use 'armbian-config --help' for more information.
Usage: armbian-configng main=[arguments] selection=[options]
armbian-configng main=System selection=Headers - Install headers:
armbian-configng main=System selection=Headers_remove - Remove headers:
~~~

View File

@@ -1,5 +1,5 @@
# Armbian-config Menu list.
# Menu list.
armbian-config jobs list.
### S01
@@ -9,9 +9,6 @@ Enable Armbina kernal upgrades
Jobs:
~~~
get_user_continue "This will allow apt to update boot critical items
Continue?" process_input
set_safe_boot unhold
~~~
@@ -22,9 +19,6 @@ Disable Armbina kernal upgrades
Jobs:
~~~
get_user_continue "This will apt hold boot critical items
Continue?" process_input
set_safe_boot freeze
~~~
@@ -42,6 +36,26 @@ would you like to continue?" process_input
nano /boot/armbianEnv.txt
~~~
### S04
Install Linux headers
Jobs:
~~~
Headers_install
~~~
### S05
Remove Linux headers
Jobs:
~~~
Headers_remove
~~~
### BT0
Install Bluetooth support

Some files were not shown because too many files have changed in this diff Show More