#!/bin/ash # set variables exec < /dev/tty5 > /dev/tty5 chvt 5 #get $BRAND echo "Please choose the brand for this server" echo "1) Secured Servers 2) Cavecreek 3) ECSuite" #Ubuntu sucks, use bash you bastards #select BRAND in securedservers.com cavecreek.net ecsuitehosting.com; read CHOICE; if [[ $CHOICE == 1 ]]; then BRAND="securedservers.com"; elif [[ $CHOICE == 2 ]]; then BRAND="cavecreek.net"; elif [[ $CHOICE == 3 ]]; then BRAND="ecsuitehosting.com"; fi; done echo $BRAND > /tmp/myvar-brand #get $HOSTNAME echo "Please enter the portion before the brand" read -p "Hostname: " HOSTNAME echo $HOSTNAME > /tmp/myvar-hostname if [[ "$BRAND" == "securedservers.com" ]]; then wget http://192.168.200.2/ks/include/c5-64-packages-ssbase.cfg -O /tmp/packages.cfg echo "Would you like to add a new user(y/n)?" read -p "New User?" if [[ "$REPLY" == [yY] ]]; then #get $USER echo "Enter inital username, this will be the default user for the server" read -p "Username: " USER echo $USER > /tmp/myvar-user #get $PASSWD echo "Enter the initial user's password" read -p "Password: " PASSWD echo $PASSWD > /tmp/myvar-passwd else touch /tmp/myvar-rootonly fi else wget http://192.168.200.2/ks/include/c5-64-packages.cfg -O /tmp/packages.cfg echo vision > /tmp/myvar-user echo "5ty6%TY^" > /tmp/myvar-passwd fi #get $FE_IP_NETWORK echo "Please enter the Frontend IP range in CIDR notation, e.g. 192.168.0.0/29" read -p "Frontend IP Network: " FE_IP_NETWORK echo $FE_IP_NETWORK > /tmp/myvar-fe_ip_network #get $BE_IP echo "Please enter the single backend IP that will be assigned to this box" read -p "Backend IP: " BE_IP echo $BE_IP > /tmp/myvar-be_ip chvt 1