summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorSilvio Rhatto <rhatto@riseup.net>2013-12-25 12:52:08 -0200
committerSilvio Rhatto <rhatto@riseup.net>2013-12-25 12:52:08 -0200
commitceb9b184c6aa732abfe147eeb6b0fa811a252c00 (patch)
treeb6a274608bae39f24bd46ec1f27b46a6f49b5edc
parent99e51a54dae89d77e9bf30ab88fbf0a1a5a5c428 (diff)
downloadhydra-ceb9b184c6aa732abfe147eeb6b0fa811a252c00.tar.gz
hydra-ceb9b184c6aa732abfe147eeb6b0fa811a252c00.tar.bz2
Fixes at trac-upgrade and system-upgrade
-rwxr-xr-xshare/hydractl/system-upgrade8
-rwxr-xr-xshare/hydractl/trac-upgrade5
2 files changed, 11 insertions, 2 deletions
diff --git a/share/hydractl/system-upgrade b/share/hydractl/system-upgrade
index f2e3917..a309658 100755
--- a/share/hydractl/system-upgrade
+++ b/share/hydractl/system-upgrade
@@ -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
diff --git a/share/hydractl/trac-upgrade b/share/hydractl/trac-upgrade
index 06a6a69..31e8f52 100755
--- a/share/hydractl/trac-upgrade
+++ b/share/hydractl/trac-upgrade
@@ -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
(