-
Notifications
You must be signed in to change notification settings - Fork 0
Expand file tree
/
Copy pathinstall-svxlink.sh
More file actions
executable file
·147 lines (109 loc) · 4.44 KB
/
Copy pathinstall-svxlink.sh
File metadata and controls
executable file
·147 lines (109 loc) · 4.44 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
110
111
112
113
114
115
116
117
118
119
120
121
122
123
124
125
126
127
128
129
130
131
132
133
134
135
136
137
138
139
140
141
142
#!/bin/bash
run() {
exec=$1
printf "\x1b[38;5;104m --> ${exec}\x1b[39m\n"
eval ${exec}
}
say () {
say=$1
printf "\x1b[38;5;220m${say}\x1b[38;5;255m\n"
}
MYPATH=${PWD}
say "Installing SVXLink Prerequisites"
run "apt install netcat-openbsd libssl-dev ladspa-sdk moreutils build-essential g++ make cmake libsigc++-2.0-dev php libgsm1-dev libudev-dev libpopt-dev tcl-dev libgpiod-dev gpiod libgcrypt20-dev libspeex-dev libasound2-dev alsa-utils libjsoncpp-dev libopus-dev rtl-sdr libcurl4-openssl-dev libogg-dev librtlsdr-dev groff doxygen graphviz python3-serial toilet sox bc avahi-daemon avahi-utils tap-plugins -y"
say "Adding svxlink user and groups"
run "groupadd svxlink"
run "useradd -g svxlink -d /etc/svxlink svxlink"
run "usermod -aG audio,nogroup,svxlink,plugdev,gpio svxlink"
say "Installing/Compiling SVXLink"
run "git clone --branch maint https://github.com/sm0svx/svxlink.git"
run "mkdir svxlink/src/build"
run "cd svxlink/src/build/"
run "cmake -DUSE_QT=OFF -DCMAKE_INSTALL_PREFIX=/usr -DSYSCONF_INSTALL_DIR=/etc -DLOCAL_STATE_DIR=/var -DWITH_SYSTEMD=ON .."
run "make -j1"
run "make doc"
run "make install"
cd ${MYPATH}
say "Creating events.d symlink"
run "cd /usr/share/svxlink/events.d"
run "ln -s . local"
cd ${MYPATH}
say "Updating LD"
run "ldconfig"
say "Installing svxlink sounds"
run "cd /usr/share/svxlink/sounds"
run 'git clone "https://github.com/sm0svx/svxlink-sounds-en_US-heather"'
run "${MYPATH}/svxlink/src/svxlink/scripts/filter_sounds.sh -r 16000 svxlink-sounds-en_US-heather en_US"
run "rm -fr svxlink-sounds-en_US-heather"
run "rm -f svxlink-sounds-en_US.tar.bz2"
cd ${MYPATH}
say "Install svxlink_rotate"
run "cp svxlink_rotate /usr/sbin"
run "chmod a+x /usr/sbin/svxlink_rotate"
run "ln -s /usr/sbin/svxlink_rotate /etc/cron.daily/svxlink_rotate"
say "Install svxlink_checkalsa"
run "cp svxlink_checkalsa /usr/sbin"
run "chmod a+x /usr/sbin/svxlink_checkalsa"
say "Updating svxlink.service"
run "cp svxlink.service /lib/systemd/system/svxlink.service"
say "Updating remotetrx.service"
run "cp remotetrx.service /lib/systemd/system/remotetrx.service"
say "Install hostspot_logger"
run "cp hotspot_logger /usr/sbin/hotspot_logger"
run "chmod +x /usr/sbin/hotspot_logger"
say "Install hotspot_dtmf"
run "cp hotspot_dtmf /usr/sbin/hotspot_dtmf"
run "chmod +x /usr/sbin/hotspot_dtmf"
say "Sysctl UDP tuning parameters"
run "cp 97-rfguru.conf /etc/sysctl.d/97-rfguru.conf"
say "Install Gum"
run "cp gum /usr/sbin/gum"
run "chmod a+rx /usr/sbin/gum"
say "Install svxlink-update-release"
run "cp update-svxlink-release.sh /usr/sbin/update-svxlink-release"
run "chmod +x /usr/sbin/svxlink-update-release"
say "Install hotspot-detect"
run "cp hotspot-detect /usr/sbin/hotspot-detect"
run "chmod +x /usr/sbin/hotspot-detect"
say "Install hostspot-config"
run "cp hotspot-config /usr/sbin/hotspot-config"
run "chmod +x /usr/sbin/hotspot-config"
say "Install mylocalip"
run "cp mylocalip /usr/sbin/mylocalip"
run "chmod +x /usr/sbin/mylocalip"
say "Install hotspot_bandswitch"
run "cp hotspot_bandswitch /usr/sbin/hotspot_bandswitch"
run "chmod +x /usr/sbin/hotspot_bandswitch"
say "Install hotspot-on-webportal"
run "cp hotspot-on-webportal /usr/sbin/hotspot-on-webportal"
run "chmod +x /usr/sbin/hotspot-on-webportal"
say "Install svxlink-message"
run "cp svxlink-message /usr/sbin/svxlink-message"
run "chmod +x /usr/sbin/svxlink-message"
say "Install custom Logic.tcl"
run "cp Logic.tcl /usr/share/svxlink/events.d/local/Logic.tcl"
say "Installing default configurations"
run "cat svxlink.conf > /etc/svxlink/svxlink.conf"
run "cat svxlink.conf > /etc/svxlink/svxlink.conf.orig"
say "Install fmchip-monitor"
run "cp fmchip-monitor.py /usr/sbin/fmchip-monitor"
run "chmod +x /usr/sbin/fmchip-monitor"
say "Install fmchip-monitor.service"
run "cp fmchip-monitor.service /lib/systemd/system/fmchip-monitor.service"
run "systemctl enable fmchip-monitor"
say "Install hotspot-online"
run "cp hotspot-online /usr/sbin/hotspot-online"
run "chmod +x /usr/sbin/hotspot-online"
say "Install hotspot-online.service"
run "cp hotspot-online.service /lib/systemd/system/hotspot-online.service"
run "systemctl enable hotspot-online"
say "Installing systemd services"
run "systemctl enable svxlink"
say "Install hostpot oled display"
run "apt install -y fonts-terminus fonts-terminus-otb fonts-dejavu fonts-noto-mono"
sudo apt install -y fonts-spleen
say "Cleanup system"
run "sudo apt clean"
run "sudo apt autoclean"
say "Starting hotspot configation !"
run "/usr/sbin/hotspot-config"