mirror of
https://github.com/LaCasemate/fab-manager.git
synced 2025-02-06 01:08:21 +01:00
handle ctrl-c in upgrade scripts
This commit is contained in:
parent
b4ee2f9b85
commit
c0acfe0f1c
@ -629,13 +629,19 @@ start_upgrade()
|
|||||||
esac
|
esac
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function trap_ctrlc()
|
||||||
|
{
|
||||||
|
echo "Ctrl^C, exiting..."
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
upgrade_elastic()
|
upgrade_elastic()
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
detect_installation
|
detect_installation
|
||||||
read -rp "Continue with upgrading? (y/n) " confirm </dev/tty
|
read -rp "Continue with upgrading? (y/n) " confirm </dev/tty
|
||||||
if [[ "$confirm" = "y" ]]
|
if [[ "$confirm" = "y" ]]; then
|
||||||
then
|
trap "trap_ctrlc" 2 # SIGINT
|
||||||
ensure_initial_status_green
|
ensure_initial_status_green
|
||||||
start_upgrade '1.7' '2.4'
|
start_upgrade '1.7' '2.4'
|
||||||
reindex_indices '24'
|
reindex_indices '24'
|
||||||
|
@ -166,12 +166,18 @@ clean()
|
|||||||
fi
|
fi
|
||||||
}
|
}
|
||||||
|
|
||||||
|
function trap_ctrlc()
|
||||||
|
{
|
||||||
|
echo "Ctrl^C, exiting..."
|
||||||
|
exit 2
|
||||||
|
}
|
||||||
|
|
||||||
upgrade_postgres()
|
upgrade_postgres()
|
||||||
{
|
{
|
||||||
config
|
config
|
||||||
read -rp "Continue with upgrading? (y/N) " confirm </dev/tty
|
read -rp "Continue with upgrading? (y/N) " confirm </dev/tty
|
||||||
if [[ "$confirm" = "y" ]]
|
if [[ "$confirm" = "y" ]]; then
|
||||||
then
|
trap "trap_ctrlc" 2 # SIGINT
|
||||||
OLD='9.4'
|
OLD='9.4'
|
||||||
NEW='9.6'
|
NEW='9.6'
|
||||||
read_path
|
read_path
|
||||||
|
Loading…
x
Reference in New Issue
Block a user