Repository navigation
Expand file tree
/
Copy pathserver_install.sh
More file actions
executable file
·109 lines (98 loc) · 2.34 KB
/
Copy pathserver_install.sh
File metadata and controls
executable file
·109 lines (98 loc) · 2.34 KB
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
59
60
61
62
63
64
65
66
67
68
69
70
71
72
73
74
75
76
77
78
79
80
81
82
83
84
85
86
87
88
89
90
91
92
93
94
95
96
97
98
99
100
101
102
103
104
105
106
107
108
109
#!/bin/bash
###
### Field Day Pi Server Install
###
###
##
## REVISION: 20210614-2100
##
##
## INIT VARIABLES
##
# GitHub Repos
fielddaypiserv_github_repo="https://github.com/joecupano/FieldDayPiServer.git"
##
## START
##
echo " "
echo "Field Day Pi Server Install"
echo " "
echo "- Ensure Operating System is up to date"
echo " "
sudo apt-get update
sudo apt-get -y upgrade
#echo " "
#echo "- Disable WiFi and Bluetooth"
#echo " "
#sudo cat << EOF >> /boot/config.txt
#dtoverlay=disable-wifi
#dtoverlay=disable-
#EOF
sleep 3
echo " "
echo "- Update Static IP Address"
echo " "
sudo cat << EOF >> /etc/dhcpcd.conf
### added by server_script.sh ###
interface eth0
arping 192.168.15.1
arping 192.168.73.1
# Field Day Static IP configuration:
profile 192.168.73.1
static ip_address=192.168.73.100/24
static routers=192.168.73.1
static domain_name_servers=192.168.73.1
# Home Network
profile 192.168.15.1
static ip_address=192.168.10.75/21
static routers=192.168.15.1
static domain_name_servers=192.168.15.1
EOF
sleep 3
echo " "
echo "- Add Field Day Log Account"
echo " "
sudo adduser fieldday
echo " "
echo "- Install Windows File Server (Samba)"
echo " "
sudo apt-get -y install samba samba-common-bin
sleep 3
echo " "
echo "- Add pi password to Windows File Server"
echo " "
sudo smbpasswd -a pi
echo " "
echo "- Add fieldday password to Windows File Server"
echo " "
sudo smbpasswd -a fieldday
echo " "
echo "- Start Windows File Server"
echo " "
sudo systemctl restart smbd
echo " "
echo "- Install Web Server (nginx)"
echo " "
sleep 3
sudo apt-get -y install nginx
##echo " "
##echo "- Generate self-signed SSL certificate -- /C=US/ST=New York/L=Hudson Valley/O=Hudson Valley Digital Network/OU=HASviolet/CN=hvdn.org"
##echo " "
##sudo openssl req -x509 -nodes -days 1095 -newkey rsa:2048 -subj "/C=US/ST=New York/L=Hudson Valley/O=Hudson Valley Digital Network/OU=HASviolet/CN=hvdn.org" -keyout /etc/ssl/private/fielddaypiserver.key -out /etc/ssl/private/fielddaypiserver.crt
echo " "
echo "- Copy sample web pages into /var/www/html"
echo " "
sudo cp ~/FieldDayPiServer/sample-web-site/* /var/www/html
echo " "
echo "- Start Web Server (nginx)"
echo " "
sudo systemctl start nginx
echo " "
echo " "
echo "Field Day Pi Server install Complete"
echo " "
echo " Be sure to create/add all web pages/files in the /var/www/html directory"
echo " "
echo "- Enjoy!"
echo " "
exit 0