Skip to content

Commit

Permalink
apt -> pkg_*
Browse files Browse the repository at this point in the history
  • Loading branch information
dimitry-ishenko committed Dec 15, 2024
1 parent 8011254 commit a01ed2a
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 8 deletions.
2 changes: 1 addition & 1 deletion tools/modules/functions/set_runtime_variables.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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

Expand Down
11 changes: 4 additions & 7 deletions tools/modules/software/install_webmin.sh
Original file line number Diff line number Diff line change
Expand Up @@ -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."
;;

Expand Down

0 comments on commit a01ed2a

Please sign in to comment.