]> gitweb.fluxo.info Git - kvmx.git/commitdiff
Feat: provision: debian: add PROVISION_UPGRADED variable master
authorSilvio Rhatto <rhatto@riseup.net>
Fri, 26 Dec 2025 23:34:02 +0000 (20:34 -0300)
committerSilvio Rhatto <rhatto@riseup.net>
Fri, 26 Dec 2025 23:34:02 +0000 (20:34 -0300)
share/provision/debian/basic
share/provision/debian/webserver

index cfd2122e72d0915c3ee9449fbfd0b91b53561f67..e93dc2d75eecc9f66ff2aa7169897912aaf1c683 100755 (executable)
@@ -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
index 9098007ecaa7eee8cd4dba0cf53633974f05858c..9e37408e3e5b1d0d6adf3e2f4f90109be62dbe69 100755 (executable)
@@ -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