]> gitweb.fluxo.info Git - hydra.git/commitdiff
Fixes at trac-upgrade and system-upgrade
authorSilvio Rhatto <rhatto@riseup.net>
Wed, 25 Dec 2013 14:52:08 +0000 (12:52 -0200)
committerSilvio Rhatto <rhatto@riseup.net>
Wed, 25 Dec 2013 14:52:08 +0000 (12:52 -0200)
share/hydractl/system-upgrade
share/hydractl/trac-upgrade

index f2e391719cf5df87dcea54cbb893e174251625ae..a309658c8a20e836de384d76e96f4d9f8301fc74 100755 (executable)
@@ -121,8 +121,12 @@ if [ ! -e "$STATE" ]; then
 else
   # Resume from the previous state
   STAGE="`cat $STATE`"
-  source $ENV
-  hydra_system_upgrade_$STATE
+
+  # Restore environment
+  if [ -e "$ENV" ]; then
+    source $ENV
+    hydra_system_upgrade_$STATE
+  fi
 fi
 
 # Prepare
index 06a6a696547f0a7880d0612a9b46f7b9e432be15..31e8f529f94cf5acc087e8a69ca079a596d0cad0 100755 (executable)
@@ -23,6 +23,11 @@ hydra_config_load
 # Parameters
 BASE="/var/sites"
 
+# Check for sites
+if [ ! -d "$BASE" ]; then
+  exit
+fi
+
 # Upgrade
 for instance in `find $BASE -maxdepth 2 -name trac`; do
   (