Test
This commit is contained in:
parent
ad29e15cc0
commit
3789b538e4
46
install.sh
46
install.sh
|
@ -16,13 +16,41 @@ if [ $(id -u) != 0 ] ; then
|
|||
exit 1
|
||||
fi
|
||||
|
||||
apt_install() {
|
||||
# Menu for script
|
||||
echo ""
|
||||
echo "${Purple}Welcome to XO installer by Antho${NORMAL}"
|
||||
echo "${Purple}XO version : from sources${NORMAL}"
|
||||
echo "${Purple}XO folder : xen-orchestra/packages/xo-server${NORMAL}"
|
||||
echo ""
|
||||
echo "SELECT YOUR FAVORITE FRUIT";
|
||||
echo "1. Install"
|
||||
echo "2. Update"
|
||||
echo "9. Exit"
|
||||
echo -n "Enter your choice [1-9]: "
|
||||
|
||||
while :
|
||||
do
|
||||
read choice
|
||||
|
||||
case $choice in
|
||||
|
||||
# Install
|
||||
1) apt_install() {
|
||||
if [ $? -ne 0 ]; then
|
||||
echo "${Red}Cannot install $@ - Cancellation${NORMAL}"
|
||||
exit 1
|
||||
fi
|
||||
}
|
||||
|
||||
STEP=0
|
||||
|
||||
# Exit
|
||||
9) echo "Bye ..."
|
||||
exit;;
|
||||
# Default
|
||||
*) echo "invalid option";;
|
||||
|
||||
|
||||
step_1_upgrade() {
|
||||
echo "---------------------------------------------------------------------"
|
||||
echo "${Yellow}Starting step 1 Update and base pakage${NORMAL}"
|
||||
|
@ -104,16 +132,18 @@ step_7_xo_running() {
|
|||
service orchestra start
|
||||
echo "${Green}Step 7 completed${NORMAL}"
|
||||
echo ""
|
||||
}
|
||||
};;
|
||||
|
||||
2) echo " Update in progress";;
|
||||
|
||||
# Pattern 4
|
||||
4) echo "Quiting ..."
|
||||
exit;;
|
||||
# Default Pattern
|
||||
*) echo "invalid option";;
|
||||
|
||||
|
||||
STEP=0
|
||||
|
||||
echo ""
|
||||
echo "${Purple}Welcome to XO installer by Antho${NORMAL}"
|
||||
echo "${Purple}XO version : from sources${NORMAL}"
|
||||
echo "${Purple}XO folder : xen-orchestra/packages/xo-server${NORMAL}"
|
||||
echo ""
|
||||
|
||||
case ${STEP} in
|
||||
0)
|
||||
|
|
Loading…
Reference in New Issue
Block a user