chg: [installer] If we detect packer, we behave accordingly.

chg: [installer] Updated installer
pull/4602/head
Steve Clement 2019-05-09 16:43:56 +09:00
parent f36947416a
commit ba292cf618
6 changed files with 26 additions and 12 deletions

View File

@ -173,7 +173,7 @@ usage () {
space
echo -e " -C | Only do ${YELLOW}pre-install checks and exit${NC}" # pre
space
echo -e " -u | Do an unattanded Install, no questions asked" # UNATTENDED
echo -e " -u | Do an unattended Install, no questions asked" # UNATTENDED
echo -e "${HIDDEN} -U | Attempt and upgrade of selected item${NC}" # UPGRADE
echo -e "${HIDDEN} -N | Nuke this MISP Instance${NC}" # NUKE
echo -e "${HIDDEN} -f | Force test install on current Ubuntu LTS schim, add -B for 18.04 -> 18.10, or -BB 18.10 -> 19.10)${NC}" # FORCE
@ -266,9 +266,10 @@ checkManufacturer () {
echo $MANUFACTURER
}
# Dynamic horizontal spacer
# Dynamic horizontal spacer if needed, for autonomeous an no progress bar install, we are static.
space () {
if [[ "$NO_PROGRESS" == "1" ]]; then
if [[ "$NO_PROGRESS" == "1" ]] || [[ "$PACKER" == "1" ]]; then
echo "--------------------------------------------------------------------------------"
return
fi
# Check terminal width
@ -299,7 +300,7 @@ spin()
# Progress bar
progress () {
if [[ "$NO_PROGRESS" == "1" ]]; then
if [[ "$NO_PROGRESS" == "1" ]] || [[ "$PACKER" == "1" ]]; then
return
fi
bar="#"
@ -885,6 +886,12 @@ theEnd () {
space
fi
if [[ "$PACKER" == "1" ]]; then
echo -e "${RED}This was an Automated Packer install!${NC}"
echo -e "This means we forced an unattended install."
space
fi
if [[ "$USER" != "$MISP_USER" ]]; then
sudo su - ${MISP_USER}
fi

View File

@ -1 +1 @@
aa8e9e255cc310fb5648969b5946453647807d4d INSTALL.sh
393bc7d182cc4a2c1296d72df76b9283a2a7900d INSTALL.sh

View File

@ -1 +1 @@
a65099cbc83d1e5e0c0be678c9347a7dfea589b953b7b25790314dc66a7bf1a6 INSTALL.sh
9ed39a83bce4c512a023f525ca978399c260c5dc28ad21cc1207094205ea691e INSTALL.sh

View File

@ -1 +1 @@
52e48a5b2cb74fa976737daf7a72a2f8a75bd53a111ee9eb643f31a456300eb010ff284ed6ea917e53d6a582d82388c1 INSTALL.sh
2e2ebb6273da87f59ddce9dab3e73907e00abeb80b3c9b513ef9ba557f0f7d1cc011dff0a7a9cf9ed891fb47d11ddbdf INSTALL.sh

View File

@ -1 +1 @@
9cc599865d1925d89ff17e3e9383d45d78ea919c29dfdeeedfcbe9810af683eca6f3a88d644f7cf4fb9226b0c481139f71b2a471110a901c72c104c76d53f4aa INSTALL.sh
5e6b5fea8b31178a31e326d45fec621d079a73b3e8538fa579cbd3aaafcfe0b0da4cf816e37522d369b3689351fbf18fa9fe9b6a7249b9f3c905cb31c75db9d9 INSTALL.sh

View File

@ -33,7 +33,7 @@ usage () {
space
echo -e " -C | Only do ${YELLOW}pre-install checks and exit${NC}" # pre
space
echo -e " -u | Do an unattanded Install, no questions asked" # UNATTENDED
echo -e " -u | Do an unattended Install, no questions asked" # UNATTENDED
echo -e "${HIDDEN} -U | Attempt and upgrade of selected item${NC}" # UPGRADE
echo -e "${HIDDEN} -N | Nuke this MISP Instance${NC}" # NUKE
echo -e "${HIDDEN} -f | Force test install on current Ubuntu LTS schim, add -B for 18.04 -> 18.10, or -BB 18.10 -> 19.10)${NC}" # FORCE
@ -126,9 +126,10 @@ checkManufacturer () {
echo $MANUFACTURER
}
# Dynamic horizontal spacer
# Dynamic horizontal spacer if needed, for autonomeous an no progress bar install, we are static.
space () {
if [[ "$NO_PROGRESS" == "1" ]]; then
if [[ "$NO_PROGRESS" == "1" ]] || [[ "$PACKER" == "1" ]]; then
echo "--------------------------------------------------------------------------------"
return
fi
# Check terminal width
@ -159,7 +160,7 @@ spin()
# Progress bar
progress () {
if [[ "$NO_PROGRESS" == "1" ]]; then
if [[ "$NO_PROGRESS" == "1" ]] || [[ "$PACKER" == "1" ]]; then
return
fi
bar="#"
@ -749,6 +750,12 @@ theEnd () {
space
fi
if [[ "$PACKER" == "1" ]]; then
echo -e "${RED}This was an Automated Packer install!${NC}"
echo -e "This means we forced an unattended install."
space
fi
if [[ "$USER" != "$MISP_USER" ]]; then
sudo su - ${MISP_USER}
fi