Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

bugfix for crucible-install.sh where /etc/sysconfig/crucible does not… #399

Merged
merged 1 commit into from
Sep 4, 2024
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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
Loading