Skip to content

Commit

Permalink
bugfix for crucible-install.sh where /etc/sysconfig/crucible does not…
Browse files Browse the repository at this point in the history
… get "reset" during a reinstall
  • Loading branch information
k-rister committed Sep 4, 2024
1 parent 83349b4 commit 44c37d4
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 44c37d4

Please sign in to comment.