aboutsummaryrefslogtreecommitdiff
path: root/share/provision
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2025-12-26 20:34:02 -0300
committerSilvio Rhatto <rhatto@riseup.net>2025-12-26 20:34:02 -0300
commitf5bbd8b1c4a054f9513f03bdb10dee780a5f383d (patch)
tree79e7edb9cf9ebf795104c541d07e8105cc95ca5b /share/provision
parent4aed114827e075aeb63194f89203845406c9ac4d (diff)
downloadkvmx-master.tar.gz
kvmx-master.tar.bz2
Feat: provision: debian: add PROVISION_UPGRADED variableHEADmaster
Diffstat (limited to 'share/provision')
-rwxr-xr-xshare/provision/debian/basic12
-rwxr-xr-xshare/provision/debian/webserver7
2 files changed, 13 insertions, 6 deletions
diff --git a/share/provision/debian/basic b/share/provision/debian/basic
index cfd2122..e93dc2d 100755
--- a/share/provision/debian/basic
+++ b/share/provision/debian/basic
@@ -27,10 +27,14 @@ MIRROR="$3"
APT_INSTALL="sudo LC_ALL=C DEBIAN_FRONTEND=noninteractive apt-get install -y"
# Upgrade
-if which hydractl &> /dev/null; then
- hydractl upgrade
-else
- sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean || exit 1
+if [ "$PROVISION_UPGRADED" != "1" ]; then
+ if which hydractl &> /dev/null; then
+ hydractl upgrade
+ else
+ sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean || exit 1
+ fi
+
+ export PROVISION_UPGRADED="1"
fi
# Dependencies
diff --git a/share/provision/debian/webserver b/share/provision/debian/webserver
index 9098007..9e37408 100755
--- a/share/provision/debian/webserver
+++ b/share/provision/debian/webserver
@@ -26,5 +26,8 @@ DOMAIN="$2"
MIRROR="$3"
# Run
-sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
-sudo apt-get install -y apache2
+if [ "$PROVISION_UPGRADED" != "1" ]; then
+ sudo apt-get update && sudo apt-get upgrade -y && sudo apt-get autoremove -y && sudo apt-get clean
+ sudo apt-get install -y apache2
+ export PROVISION_UPGRADED="1"
+fi