Skip to content

Commit

Permalink
Merge pull request #399 from perftool-incubator/dev-kmr2
Browse files Browse the repository at this point in the history
bugfix for crucible-install.sh where /etc/sysconfig/crucible does not…
  • Loading branch information
k-rister authored Sep 4, 2024
2 parents 83349b4 + 44c37d4 commit 3fea83f
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion crucible-install.sh
Original file line number Diff line number Diff line change
Expand Up @@ -198,12 +198,22 @@ function list_releases {

# cleanup previous installation
function clean_old_install {
local timestamp

timestamp=$(date +%d-%m-%Y_%H:%M:%S)

if [ -d $INSTALL_PATH ]; then
old_install_path="/opt/crucible-moved-on-`date +%d-%m-%Y_%H:%M:%S`"
old_install_path="/opt/crucible-moved-on-${timestamp}"
echo "An existing installation of crucible exists and will be moved to $old_install_path"
/bin/mv "$INSTALL_PATH" "$old_install_path"
fi

if [ -e ${SYSCONFIG} ]; then
old_sysconfig="${SYSCONFIG}-moved-on-${timestamp}"
echo "An existing crucible sysconfig file exists and will be moved to ${old_sysconfig}"
/bin/mv "${SYSCONFIG}" "${old_sysconfig}"
fi

# reset the update tracker if there is any existing state
rm -f "${USER_DIR}/update-status*" > /dev/null
}
Expand Down

0 comments on commit 3fea83f

Please sign in to comment.