-
Notifications
You must be signed in to change notification settings - Fork 0
/
convix_installer
executable file
·58 lines (49 loc) · 1015 Bytes
/
convix_installer
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
#!/usr/local/bin/cbsd
#v10.0.0
CBSDMODULE="convectix"
MYARG=""
MYOPTARG="mode firststart"
MYDESC="convix install script"
ADDHELP="additional info\n"
. ${subr}
. ${cbsdinit}
#defines
_MYDIR=$(dirname `realpath $0`)
trap "INSTALLLOOP=0 ; clear; echo; echo \"Exit to shell. To return into bootstrap script, please type: cbsd wb_installer\"; echo" HUP INT ABRT BUS TERM EXIT
### MAIN Route ###
set -e
. ${_MYDIR}/convix_installer.subr
. ${_MYDIR}/wb_net_helper.subr
set +e
[ -n "${firststart}" ] && kldload zfs 2>/dev/null
nic_test
disk_test
while [ ${INSTALLLOOP} -eq 1 ]; do
save_settings
service nginx reload >/dev/null 2>&1
clear
${ECHO} " ${BOLD}==== Welcome to ${PRODUCT} bootstrap script ====${N0_COLOR} "
show_menu
read p
case ${p} in
1)
network
;;
2)
storage
;;
i)
[ -z "${MYDSK}" ] && continue
install
post_install
;;
0)
echo "Reboot"
INSTALLLOOP=0
exit
;;
*)
echo "Unknown"
;;
esac
done