Skip to content
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
11 changes: 8 additions & 3 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -10,13 +10,18 @@ You can easily setup **automations** with the differents **options**.
<br>

## Features
* (available) Unified Linux updates ([APT](https://fr.wikipedia.org/wiki/Advanced_Packaging_Tool) and [Snapcraft](https://snapcraft.io/) packages (Snapcraft is not installed with this script, it just handled if already used)).
* (incoming) Unified Linux updates (firmwares with [fwupd](https://github.com/fwupd/fwupd)).
* Unified Linux updates ([APT](https://fr.wikipedia.org/wiki/Advanced_Packaging_Tool), [Snapcraft](https://snapcraft.io/)* & firmwares with [fwupd](https://github.com/fwupd/fwupd)*).
* (incoming) Secure Linux firewall (close ports with [nftables](https://wiki.nftables.org/wiki-nftables/index.php/Main_Page) ([Docker](https://www.docker.com/) compatible)).
* (incoming) Routes over VPN to one or many points ([OpenVPN](https://openvpn.net/) compatible).

<br>

\* _Snapcraft is not installed with this script, it's just handled if already used._

\* _fwupd is installed only if your system is bare-metal._

<br>

## Quick start
Copy/paste the following command blocks on your Linux terminal to manage your Bashpack installation.
* _You must be sudo._
Expand Down Expand Up @@ -78,4 +83,4 @@ Incoming
### Routes over VPN
Incoming

<br>
<br>
2 changes: 1 addition & 1 deletion bashpack.sh
Original file line number Diff line number Diff line change
Expand Up @@ -26,7 +26,7 @@

URL="https://api.github.com/repos/bashpack-project/bashpack/tarball" # Github latest tarball

VERSION="0.2.24"
VERSION="0.3.0"

NAME="Bashpack"
NAME_LOWERCASE=$(echo "$NAME" | tr A-Z a-z)
Expand Down
56 changes: 26 additions & 30 deletions commands/update.sh
Original file line number Diff line number Diff line change
Expand Up @@ -170,36 +170,32 @@ fi



# # NEED TO RUN SOME TESTS BEFORE MAKE THIS PUBLIC
# # --- Update Firmwares (with fwupd) ---
# section_title=""$'\n'">>> fwupd"

# # Usage : upgrade_with_fwupd <-y>
# upgrade_with_fwupd() {
# echo "Upgrading with fwupd... "

# # Ask for confirmation or auto update if <-y>).
# if [[ ${1} != "-y" ]]; then
# read -p "$continue_question" install_confirmation_fwupd
# if [[ $install_confirmation_fwupd = $yes ]]; then
# loading "fwupdmgr upgrade"
# fi
# else
# loading "fwupdmgr upgrade"
# fi

# echo ""
# echo ""
# }

# if [[ $(exists_command "fwupdmgr") = "exists" ]]; then
# echo "$section_title"
# upgrade_with_fwupd $install_confirmation
# else
# echo "$section_title"
# install_package apt fwupd
# upgrade_with_fwupd $install_confirmation
# fi
# --- Update Firmwares (with fwupd) ---
section_title=""$'\n'">>> fwupd"

# Checking if the system is bare-metal (and not virtualized) with the systemd-detect-virt command.
# If not bare-metal, firmwares will not be updated.
if [[ $(exists_command "systemd-detect-virt") = "exists" ]]; then
if [[ $(systemd-detect-virt) = "none" ]]; then

# Process to firmware updates with fwupdmgr
if [[ $(exists_command "fwupdmgr") = "exists" ]]; then
echo "$section_title"
fwupdmgr upgrade $install_confirmation
else
echo "$section_title"
install_package apt fwupd

if [[ $(exists_command "fwupdmgr") = "exists" ]]; then
fwupdmgr upgrade $install_confirmation
fi
fi
fi
else
echo "Error: can't detect if your system is bare-metal with the command 'systemd-detect-virt'. Will not upgrade firmwares."
fi




# Properly exit
Expand Down