-
-
Notifications
You must be signed in to change notification settings - Fork 20
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
Showing
64 changed files
with
3,641 additions
and
335 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,29 @@ | ||
name: Debian package | ||
# | ||
# Description | ||
# | ||
|
||
on: | ||
workflow_dispatch: | ||
push: | ||
branches: | ||
- main | ||
|
||
jobs: | ||
|
||
Debian: | ||
uses: armbian/scripts/.github/workflows/pack-debian.yml@master | ||
with: | ||
matrix: "all:jammy" | ||
maintainer: "Igor Pecovnik <[email protected]>" | ||
package: "configng" | ||
licence: "GPL 2.0" | ||
homepage: "https://www.armbian.com" | ||
section: "default" | ||
priority: "optional" | ||
depends: "bash" | ||
description: "Configng" | ||
|
||
secrets: | ||
GPG_PRIVATE_KEY: ${{ secrets.GPG_KEY1 }} | ||
PASSPHRASE: ${{ secrets.GPG_PASSPHRASE1 }} |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,34 @@ | ||
on: push | ||
name: 🚀 Deploy website on push | ||
|
||
jobs: | ||
web-deploy: | ||
name: 🎉 Deploy | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository_owner == 'Tearran' }} | ||
steps: | ||
- name: 🚚 Get latest code | ||
uses: actions/checkout@v3 | ||
|
||
- name: Install ShellCheck | ||
run: sudo apt-get install pandoc git shellcheck | ||
- name: Run ShellCheck | ||
run: | | ||
ret=0 | ||
for file in $(find . -type f -name "*.sh"); do | ||
shellcheck --severity=error $file || ret=$? | ||
done | ||
exit $ret | ||
|
||
- name: Generate website | ||
run: ./bin/armbian-configng --dev --web | ||
|
||
- name: 📂 Sync files | ||
uses: SamKirkland/[email protected] | ||
with: | ||
server: ${{ secrets.SERVER_HOST}} # replace with your server | ||
username: ${{ secrets.SERVER_USERNAME }} | ||
password: ${{ secrets.SERVER_PASSWORD }} | ||
server-dir: / # replace with your server directory | ||
local-dir: share/armbian-configng/web/ # replace with your local directory | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
name: Lint scripts | ||
|
||
on: | ||
workflow_dispatch: | ||
pull_request: | ||
|
||
jobs: | ||
|
||
Shellcheck: | ||
|
||
name: Shell script analysis | ||
runs-on: ubuntu-latest | ||
if: ${{ github.repository_owner == 'Armbian' }} | ||
steps: | ||
|
||
- name: Checkout repository | ||
uses: actions/checkout@v3 | ||
|
||
- name: Environment variables | ||
run: sudo -E bash -c set | ||
|
||
- name: "Shellcheck lint error report in diff format" | ||
shell: bash {0} | ||
run: | | ||
for file in $(find . -type f -executable ! -path '*/.git*/*' -exec grep -Iq . {} \; -print); do | ||
if grep -qE "^#\!/.*bash" $file; then | ||
shellcheck --severity=error $file || ret=$? | ||
fi | ||
done | ||
exit $ret |
This file was deleted.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,62 +1,100 @@ | ||
# configng | ||
This is a refactoring of [armbian-config](https://github.com/armbian/config) using [Bash Utility](https://labbots.github.io/bash-utility) | ||
embedded in this project. This allows for functional programming in Bash and also modernizes | ||
the monolithic nature of armbian-config. Error handling and validation are also included. | ||
The idea is to provide an API in Bash that can be called from a TUI, GUI or CLI. Please | ||
follow the coding standards which follow Bash Utility functions. | ||
|
||
Why Bash? Well, because it's going to be in every distribution. Striped down distributions | ||
may not include Python, C/C++, etc. build/runtime environments | ||
# 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 | ||
* `sudo apt install git` | ||
* `cd ~/` | ||
* `git clone https://github.com/armbian/configng.git` | ||
* `cd ~/configng/test` | ||
* `sudo ./cpu_test.sh` | ||
If all goes well you should see all the functions in cpu.sh called and output diaplayed. | ||
|
||
## Coding standards | ||
[Shell Style Guide](https://google.github.io/styleguide/shellguide.html) has some good ideas, | ||
but fundementally look at the code in Bash Utility: | ||
``` | ||
# @description Strip characters from the beginning of a string. | ||
# | ||
# @example | ||
# echo "$(string::lstrip "Hello World!" "He")" | ||
# #Output | ||
# llo World! | ||
# | ||
# @arg $1 string The input string. | ||
# @arg $2 string The characters you want to strip. | ||
# | ||
# @exitcode 0 If successful. | ||
# @exitcode 2 Function missing arguments. | ||
# | ||
# @stdout Returns the modified string. | ||
string::lstrip() { | ||
[[ $# -lt 2 ]] && printf "%s: Missing arguments\n" "${FUNCNAME[0]}" && return 2 | ||
printf '%s\n' "${1##$2}" | ||
} | ||
``` | ||
|
||
Functions should follow filename::func_name style. Then you can tell just from the name which | ||
file the function is located in. Return codes should also follow a similar pattern: | ||
* 0 Successful | ||
* 1 Not found | ||
* 2 Function missing arguments | ||
* 3-255 all other errors | ||
|
||
Validate values: | ||
``` | ||
# Validate minimum frequency is <= maximum frequency | ||
[ "$min_freq" -gt "$max_freq" ] && printf "%s: Minimum frequency must be <= maximum frequency\n" "${FUNCNAME[0]}" && return 5 | ||
``` | ||
|
||
Return values should use stdout: | ||
``` | ||
# Return value | ||
printf '%s\n' "$(cat $file)" | ||
``` | ||
|
||
Only use sudo when needed and never run as root! | ||
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. | ||
> |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,100 @@ | ||
|
||
# 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. | ||
> |
Oops, something went wrong.