Browse code

Added code to enter user data into config files

Richard Cornwell (K9RCP) authored on 10/26/2022 00:38:38
Showing 2 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)
68 75
new file mode 100644
... ...
@@ -0,0 +1,16 @@
1
+#!/bin/bash
2
+echo "Please enter the following:"
3
+read -p 'First and Last name: ' name
4
+read -p 'Callsign: ' callsign
5
+read -p "APRS ssid: $callsign-" ssid
6
+echo 
7
+echo "If you need your APRS Passcode you can get it here: https://willamettevalleymesh.net/aprs-passcode/"
8
+read -p 'Please enter callsign APRS Passcode: ' aprspasscode
9
+read -p 'Please enter your Email: ' email
10
+echo
11
+#echo Thankyou $uservar we now have your login details
12
+
13
+echo "ServerId   $callsign-$ssid"
14
+echo "PassCode   $aprspasscode"
15
+echo "MyAdmin    \"$name, $callsign\""
16
+echo "MyEmail   $email"