From a01ed2a1211f37e4cda438a0419d5a8ced9aabbd Mon Sep 17 00:00:00 2001 From: Dimitry Ishenko Date: Sat, 14 Dec 2024 16:51:24 -0500 Subject: [PATCH] apt -> pkg_* --- tools/modules/functions/set_runtime_variables.sh | 2 +- tools/modules/software/install_webmin.sh | 11 ++++------- 2 files changed, 5 insertions(+), 8 deletions(-) diff --git a/tools/modules/functions/set_runtime_variables.sh b/tools/modules/functions/set_runtime_variables.sh index e3c9bb86..374da15f 100644 --- a/tools/modules/functions/set_runtime_variables.sh +++ b/tools/modules/functions/set_runtime_variables.sh @@ -26,7 +26,7 @@ function set_runtime_variables() { # If any dependencies are missing, print a combined message and exit if [[ ${#missing_dependencies[@]} -ne 0 ]]; then if is_package_manager_running; then - sudo apt install ${missing_dependencies[*]} + pkg_install ${missing_dependencies[*]} fi fi diff --git a/tools/modules/software/install_webmin.sh b/tools/modules/software/install_webmin.sh index 58bfdf8a..801c765b 100644 --- a/tools/modules/software/install_webmin.sh +++ b/tools/modules/software/install_webmin.sh @@ -41,22 +41,19 @@ function module_webmin() { ;; "${commands[1]}") ## install webmin - apt update - apt install -y wget apt-transport-https + pkg_install --update wget apt-transport-https echo "deb [signed-by=/usr/share/keyrings/webmin-archive-keyring.gpg] http://download.webmin.com/download/repository sarge contrib" | sudo tee /etc/apt/sources.list.d/webmin.list wget -qO- http://www.webmin.com/jcameron-key.asc | gpg --dearmor | tee /usr/share/keyrings/webmin-archive-keyring.gpg > /dev/null - apt update - apt install -y webmin --install-recommends + pkg_install --update --install-recommends webmin echo "Webmin installed successfully." ;; "${commands[2]}") ## remove webmin systemctl disable webmin - apt purge -y webmin - apt autoremove --purge -y + pkg_remove webmin rm /etc/apt/sources.list.d/webmin.list rm /usr/share/keyrings/webmin-archive-keyring.gpg - apt update + pkg_update echo "Webmin removed successfully." ;;