resources

Oudere bestanden toegevoegt
This commit is contained in:
2018-08-30 07:36:13 +00:00
parent 17fab31a10
commit d11667090a
5 changed files with 1871 additions and 0 deletions

47
resources/installer.sh Normal file
View File

@@ -0,0 +1,47 @@
#!/bin/bash
# Bash Menu Script Example
function webserver(){
echo "----------------"
echo "$variable"
variable="in de functie"
}
variable="buiten de functie"
echo "UBUNTU 18.04 INSTALLATIE SCRIPT"
echo "Webserver:"
PS3='Keuze:'
options=("Apache" "Apache, Nginx reverse proxy" "Nginx, PHP-FPM" "Quit")
select opt in "${options[@]}"
do
case $opt in
"Apache")
echo "you chose choice 1"
break
;;
"Apache, Nginx reverse proxy")
echo "you chose choice 2"
break
;;
"Nginx, PHP-FPM")
echo "you chose choice $REPLY which is $opt"
break
;;
"Quit")
exit
;;
*) echo "invalid option $REPLY";;
esac
done
echo "INSTALLATIE WORDT UITGEVOERD >>> "
while true; do
read -p "Installeer *** kies yes/no?" yn
case $yn in
[Yy]* ) webserver $variable;;
[Nn]* ) exit;;
* ) echo "Please answer yes or no.";;
esac
done
echo "$variable"
exit