Periodic formatting cleanup
This is the semi-irregular comment and docs cleanup.
No functional changes should be here although some code is moved in a
small attempt to sort functions and get things where they need to be.
Change-Id: Ib4a3e2590c6fbd016c391acc7aef6421e91c0dca
diff --git a/lib/horizon b/lib/horizon
index ab11399..0cc250e 100644
--- a/lib/horizon
+++ b/lib/horizon
@@ -74,13 +74,20 @@
}
+
# Entry Points
# ------------
# cleanup_horizon() - Remove residual data files, anything left over from previous
# runs that a clean run would need to clean up
function cleanup_horizon() {
- :
+ if [[ is_fedora && $DISTRO =~ (rhel6) ]]; then
+ # If ``/usr/bin/node`` points into ``$DEST``
+ # we installed it via ``install_nodejs``
+ if [[ $(readlink -f /usr/bin/node) =~ ($DEST) ]]; then
+ sudo rm /usr/bin/node
+ fi
+ fi
}
# configure_horizon() - Set config files, create data dirs, etc
@@ -111,7 +118,6 @@
# Create an empty directory that apache uses as docroot
sudo mkdir -p $HORIZON_DIR/.blackhole
-
HORIZON_REQUIRE=''
if is_ubuntu; then
# Clean up the old config name
@@ -148,7 +154,6 @@
s,%DEST%,$DEST,g;
s,%HORIZON_REQUIRE%,$HORIZON_REQUIRE,g;
\" $FILES/apache-horizon.template >/etc/$APACHE_NAME/$APACHE_CONF"
-
}
# install_horizon() - Collect source and prepare
@@ -193,6 +198,7 @@
fi
}
+
# Restore xtrace
$XTRACE