-
Notifications
You must be signed in to change notification settings - Fork 4
/
Copy pathrestart.fon
executable file
·43 lines (32 loc) · 1 KB
/
restart.fon
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
#!/bin/bash
# DTMF 97 FON #
# Stop svxlink
if pgrep -x svxlink >/dev/null
then
pkill -TERM svxlink
pkill -f timersalon
fi
# Save network
echo "fon" > /etc/spotnik/network
#change the audio network name
rm /usr/share/svxlink/sounds/fr_FR/PropagationMonitor/name.wav
ln -s /usr/share/svxlink/sounds/fr_FR/RRF/Sfon.wav /usr/share/svxlink/sounds/fr_FR/PropagationMonitor/name.wav
# create svxlink.fon
rm -f /etc/spotnik/svxlink.fon
sleep 1
cat /etc/spotnik/svxlink.cfg >/etc/spotnik/svxlink.fon
echo "HOST=serveur.f1tzo.com" >>/etc/spotnik/svxlink.fon
echo "AUTH_KEY=FON-F1TZO" >>/etc/spotnik/svxlink.fon
echo "PORT=5300" >>/etc/spotnik/svxlink.fon
sleep 1
# Clear logs
> /tmp/svxlink.log
# Launch svxlink
svxlink --daemon --logfile=/tmp/svxlink.log --pidfile=/var/run/svxlink.pid --runasuser=root --config=/etc/spotnik/svxlink.fon
sleep 2
# Enable propagation monitor module
echo "10#" > /tmp/dtmf_uhf
echo "10#" > /tmp/dtmf_vhf
# debut gestion timer salon:
pkill -f timersalon
sh /etc/spotnik/timersalon.sh &