Browse code

Added lsb-release

Richard Cornwell (K9RCP) authored on 02/24/2024 01:49:01
Showing 1 changed files
1 1
old mode 100644
2 2
new mode 100755
... ...
@@ -13,7 +13,7 @@ read -p 'Your Email Address: ' email
13 13
 apt update -y
14 14
 apt upgrade -y
15 15
 
16
-apt install -y sudo build-essential htop nginx libevent* debhelper libssl-dev libcap-dev libz-dev libwww-perl libsctp-dev
16
+apt install -y sudo build-essential htop nginx libevent* debhelper libssl-dev libcap-dev libz-dev libwww-perl libsctp-dev lsb-release
17 17
 apt --fix-broken install
18 18
 
19 19
 adduser --system --no-create-home --home /var/run/aprsc --shell /usr/sbin/nologin --group aprsc
Browse code

Added libsctp-dev dependency

Richard Cornwell (K9RCP) authored on 01/14/2023 12:14:02
Showing 1 changed files
... ...
@@ -13,7 +13,7 @@ read -p 'Your Email Address: ' email
13 13
 apt update -y
14 14
 apt upgrade -y
15 15
 
16
-apt install -y sudo build-essential htop nginx libevent* debhelper libssl-dev libcap-dev libz-dev libwww-perl
16
+apt install -y sudo build-essential htop nginx libevent* debhelper libssl-dev libcap-dev libz-dev libwww-perl libsctp-dev
17 17
 apt --fix-broken install
18 18
 
19 19
 adduser --system --no-create-home --home /var/run/aprsc --shell /usr/sbin/nologin --group aprsc
Browse code

Fixed issue with installing dep file

Richard Cornwell (K9RCP) authored on 10/27/2022 04:59:18
Showing 1 changed files
... ...
@@ -9,7 +9,6 @@ echo "If you need your APRS Passcode you can get it here: https://willamettevall
9 9
 read -p 'Please enter callsign APRS Passcode: ' aprspasscode
10 10
 read -p 'Your Email Address: ' email
11 11
 
12
-su -
13 12
 
14 13
 apt update -y
15 14
 apt upgrade -y
... ...
@@ -27,7 +26,7 @@ cd aprsc-*
27 26
 cd src
28 27
 ./configure
29 28
 make make-deb
30
-sudo dpkg -i ../aprsc-*.deb
29
+sudo dpkg -i ../aprsc_*.deb
31 30
 
32 31
 
33 32
 sudo systemctl enable aprsc
... ...
@@ -190,3 +189,4 @@ EOF
190 189
 sudo systemctl enable aprsc
191 190
 
192 191
 reboot
192
+
Browse code

Fixed root issues and error on download of aprsc source

Richard Cornwell (K9RCP) authored on 10/27/2022 04:49:07
Showing 1 changed files
... ...
@@ -9,6 +9,8 @@ echo "If you need your APRS Passcode you can get it here: https://willamettevall
9 9
 read -p 'Please enter callsign APRS Passcode: ' aprspasscode
10 10
 read -p 'Your Email Address: ' email
11 11
 
12
+su -
13
+
12 14
 apt update -y
13 15
 apt upgrade -y
14 16
 
... ...
@@ -17,7 +19,8 @@ apt --fix-broken install
17 19
 
18 20
 adduser --system --no-create-home --home /var/run/aprsc --shell /usr/sbin/nologin --group aprsc
19 21
 
20
-cd wget http://he.fi/aprsc/down/aprsc-latest.tar.gz
22
+cd
23
+wget http://he.fi/aprsc/down/aprsc-latest.tar.gz
21 24
 tar xvfz aprsc-latest.tar.gz
22 25
 rm -rf aprsc-latest.tar.gz
23 26
 cd aprsc-*
Browse code

Added systemctl enable aprsc

Richard Cornwell (K9RCP) authored on 10/26/2022 00:44:34
Showing 1 changed files
... ...
@@ -184,4 +184,6 @@ FileLimit        10000
184 184
 #MagicBadness    42.7
185 185
 EOF
186 186
 
187
+sudo systemctl enable aprsc
188
+
187 189
 reboot
Browse code

Added code to enter user data into config files

Richard Cornwell (K9RCP) authored on 10/26/2022 00:38:38
Showing 1 changed files
... ...
@@ -1,3 +1,14 @@
1
+#!/bin/bash
2
+
3
+echo "Please enter the following:"
4
+read -p 'First and Last name: ' name
5
+read -p 'Callsign: ' callsign
6
+read -p "APRS ssid: $callsign-" ssid
7
+echo
8
+echo "If you need your APRS Passcode you can get it here: https://willamettevalleymesh.net/aprs-passcode/"
9
+read -p 'Please enter callsign APRS Passcode: ' aprspasscode
10
+read -p 'Your Email Address: ' email
11
+
1 12
 apt update -y
2 13
 apt upgrade -y
3 14
 
... ...
@@ -51,17 +62,13 @@ DAEMON_OPTS="-u aprsc -t /opt/aprsc -f -e info -o file -r logs -c etc/aprsc.conf
51 62
 
52 63
 EOF
53 64
 
54
-tee /opt/aprsc/etc/aprsc.conf <<EOF
55
-# Configuration for aprsc, an APRS-IS server for core servers
56
-
57
-# Your unique server ID
58
-ServerId   CALLSIGN-30
59
-# Passcode for the server ID
60
-PassCode   0
61
-# Who is running this server?
62
-MyAdmin    "Name Last, Callsign"
63
-# The email address where the admin can be reached
64
-MyEmail   email@domain.tld
65
+echo "ServerId   $callsign-$ssid" > /opt/aprsc/etc/aprsc.conf
66
+echo "PassCode   $aprspasscode" >> /opt/aprsc/etc/aprsc.conf
67
+echo "MyAdmin    \"$name, $callsign\"" >> /opt/aprsc/etc/aprsc.conf
68
+echo "MyEmail   $email" >> /opt/aprsc/etc/aprsc.conf
69
+
70
+
71
+tee -a /opt/aprsc/etc/aprsc.conf <<EOF
65 72
 
66 73
 ### Directories #########
67 74
 # Data directory (for persistent state files - currently none)
Browse code

Added first auto install script

Richard Cornwell (K9RCP) authored on 10/25/2022 16:10:29
Showing 1 changed files
1 1
new file mode 100644
... ...
@@ -0,0 +1,180 @@
1
+apt update -y
2
+apt upgrade -y
3
+
4
+apt install -y sudo build-essential htop nginx libevent* debhelper libssl-dev libcap-dev libz-dev libwww-perl
5
+apt --fix-broken install
6
+
7
+adduser --system --no-create-home --home /var/run/aprsc --shell /usr/sbin/nologin --group aprsc
8
+
9
+cd wget http://he.fi/aprsc/down/aprsc-latest.tar.gz
10
+tar xvfz aprsc-latest.tar.gz
11
+rm -rf aprsc-latest.tar.gz
12
+cd aprsc-*
13
+cd src
14
+./configure
15
+make make-deb
16
+sudo dpkg -i ../aprsc-*.deb
17
+
18
+
19
+sudo systemctl enable aprsc
20
+
21
+
22
+tee /etc/default/aprsc <<EOF
23
+
24
+#
25
+# STARTAPRSC: start aprsc on boot. Should be set to "yes" once you have
26
+#            configured aprsc.
27
+#
28
+STARTAPRSC="yes"
29
+
30
+#
31
+# Additional options that are passed to the Daemon.
32
+# Description of used options (don't change these unless
33
+# you're sure what you're doing):
34
+# -u aprsc: switch to user 'aprsc' as soon as possible
35
+# -t /opt/aprsc: chroot to the given directory
36
+# -f: fork to a daemon
37
+# -e info: log at level info
38
+# -o file: log to file
39
+# -r logs: log files are placed in /opt/aprsc/logs
40
+# -c etc/aprsc.conf: configuration file location
41
+#
42
+# Since the daemon chroots to /opt/aprsc, all paths are relative to
43
+# that directory and the daemon cannot access any files outside
44
+# the chroot.
45
+#
46
+# aprsc can log to syslog too, but that'd require bringing the
47
+# syslog socket within the chroot.
48
+#
49
+
50
+DAEMON_OPTS="-u aprsc -t /opt/aprsc -f -e info -o file -r logs -c etc/aprsc.conf"
51
+
52
+EOF
53
+
54
+tee /opt/aprsc/etc/aprsc.conf <<EOF
55
+# Configuration for aprsc, an APRS-IS server for core servers
56
+
57
+# Your unique server ID
58
+ServerId   CALLSIGN-30
59
+# Passcode for the server ID
60
+PassCode   0
61
+# Who is running this server?
62
+MyAdmin    "Name Last, Callsign"
63
+# The email address where the admin can be reached
64
+MyEmail   email@domain.tld
65
+
66
+### Directories #########
67
+# Data directory (for persistent state files - currently none)
68
+RunDir data
69
+
70
+# If logging to a file (-o file), enable built-in log rotation.
71
+# LogRotate <megabytes> <filecount>
72
+# "LogRotate 10 5" keeps 5 old files of 10 megabytes each.
73
+LogRotate 10 5
74
+
75
+### Intervals and timers #########
76
+# Interval specification format examples:
77
+# 600 (600 seconds), or 600s, 5m, 2h, 1h30m, 1d3h15m24s, etc...
78
+
79
+# When no data is received from an upstream server in N seconds, switch to
80
+# another server.
81
+UpstreamTimeout         15s
82
+
83
+# When no data is received from a downstream server in N seconds, disconnect
84
+ClientTimeout           48h
85
+
86
+### TCP listener ##########
87
+# Listen <socketname> <porttype> tcp <address to bind> <port> <options...>
88
+#       socketname: any name you wish to show up in logs and statistics
89
+#       porttype: one of:
90
+#               fullfeed - everything, after dupe filtering
91
+#               igate - igate / client port with user-specified filters
92
+#               udpsubmit - UDP packet submission port (8080)
93
+#               dupefeed - duplicate packets dropped by the server
94
+#       options:
95
+#               filter "m/500" - force a filter for users connected here
96
+#               maxclients 100 - limit clients connected on this port
97
+#               acl etc/client.acl - match client addresses against ACL
98
+#               hidden - don't show the port in the status page
99
+#
100
+#              If you wish to provide UDP service for clients, set up a
101
+#              second listener on the same address, port and protocol.
102
+#
103
+#              The  "::"  is IPv6 "IN6ADDR_ANY", whereas "0.0.0.0" is same
104
+#              with IPv4.
105
+#
106
+#              On FreeBSD you need to have separate listeners for IPv4 and
107
+#              IPv6. On Linux, just use :: alone - the IPv6 listener will
108
+#              catch the IPv4 connections just as well.
109
+#
110
+# Example of normal server ports for Linux, supporting both TCP and UDP,
111
+# IPv4 and IPv6:
112
+#
113
+Listen "Full feed"                                fullfeed tcp ::  10152 hidden
114
+Listen ""                                         fullfeed udp ::  10152 hidden
115
+
116
+Listen "Client-Defined Filters"                   igate tcp ::  14580
117
+Listen ""                                         igate udp ::  14580
118
+
119
+Listen "350 km from my position"                 igate tcp ::  20350 filter "m/350"
120
+Listen ""                                        igate udp ::  20350 filter "m/350"
121
+
122
+Listen "UDP submit"                               udpsubmit udp :: 8080
123
+
124
+### Uplink configuration ########
125
+# Uplink <name> <type> tcp <address> <port>
126
+#       name: a name of the server or service you're connecting to
127
+#       type: one of:
128
+#               full - full feed
129
+#               ro   - read-only, do not transmit anything upstream
130
+#
131
+# If you wish to specify multiple alternative servers, use multiple
132
+# Uplink lines, one for each server.
133
+#
134
+# Normally a single line for the 'rotate' address is fine - it will connect
135
+# to one of the servers in a random fashion and go for another one should
136
+# the first one become unavailable.
137
+#
138
+Uplink "Core rotate" full  tcp  rotate.aprs.net 10152
139
+#Uplink "Core rotate" ro    tcp  rotate.aprs.net 10152
140
+
141
+# OPTIONAL: Bind source address before connecting to an uplink
142
+# You can enter two addresses, one for IPv4 and one for IPv6 connections.
143
+# Needed if you have multiple IP addresses on your server and only one
144
+# of them is allowed to connect by the remote server.
145
+#UplinkBind 127.0.0.1
146
+#UplinkBind ::1
147
+
148
+### HTTP server ##########
149
+# HTTPStatus port provides a status view to web browsers.
150
+# IPv6+IPv4 support works slightly differently than in Listen:
151
+# :: is "all addresses" for IPv6, 0.0.0.0 for IPv4, but
152
+# :: only works if you actually have a global IPv6 address
153
+# configured on the system.
154
+# The example is for IPv4, change the address to :: if you have
155
+# IPv6. For FreeBSD, or if you wish to support multiple specific
156
+# ports/addresses, use multiple HTTPStatus directives for each.
157
+HTTPStatus 0.0.0.0 14501
158
+# HTTPUpload port allows position uploads over HTTP
159
+HTTPUpload 0.0.0.0 8080
160
+
161
+### Environment ############
162
+# When running this server as super-user, the server can (in many systems)
163
+# increase several resource limits, and do other things that less privileged
164
+# server can not do.
165
+#
166
+# The FileLimit is resource limit on how many simultaneous connections and
167
+# some other internal resources the system can use at the same time.
168
+# If the server is not being run as super-user, this setting has no effect
169
+# in case it is above what normal user can set.
170
+#
171
+FileLimit        10000
172
+
173
+### Operator attention span qualification run ###########
174
+# After configuring the rest of the settings, remove this bad command
175
+# from the configuration file. It's here only to avoid starting the
176
+# server up accidentally with an invalid configuration.
177
+#MagicBadness    42.7
178
+EOF
179
+
180
+reboot