mirror of
https://github.com/g4klx/DMRGateway.git
synced 2025-12-06 05:32:01 +01:00
Update scripts.
This commit is contained in:
parent
6be27b3759
commit
8e75b2453b
21
scripts/install-linker.sh
Normal file
21
scripts/install-linker.sh
Normal file
|
|
@ -0,0 +1,21 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
|
||||
cd /
|
||||
rm -rf DMRGa*
|
||||
cd /opt
|
||||
rm -rf script
|
||||
cd /var/log
|
||||
rm -rf script
|
||||
|
||||
cd /boot
|
||||
cp DMRGateway*.tgz /
|
||||
cd /
|
||||
tar -xvf DMRGateway*.tgz
|
||||
systemctl daemon-reload
|
||||
echo -n "" > /var/log/script/static-slot1.txt
|
||||
echo -n "" > /var/log/script/static-slot2.txt
|
||||
echo -n "" > /var/log/script/slot1.txt
|
||||
echo -n "" > /var/log/script/slot2.txt
|
||||
|
|
@ -5,7 +5,9 @@ After=multi-user.target
|
|||
[Service]
|
||||
Type=idle
|
||||
|
||||
ExecStart=/bin/bash /opt/script/relink-repeater.sh >> /var/log/script/checkBMAPI.log 2>&1
|
||||
ExecStart=/bin/bash /opt/script/relink-repeater.sh
|
||||
|
||||
|
||||
|
||||
|
||||
[Install]
|
||||
|
|
|
|||
|
|
@ -5,7 +5,7 @@ After=multi-user.target
|
|||
[Service]
|
||||
Type=idle
|
||||
|
||||
ExecStart=/bin/bash /opt/script/relink-hotspot.sh >> /var/log/script/checkBMAPI.log 2>&1
|
||||
ExecStart=/bin/bash /opt/script/relink-hotspot.sh
|
||||
|
||||
|
||||
[Install]
|
||||
|
|
|
|||
|
|
@ -4,7 +4,7 @@ DMR SUDO Reflector - TG
|
|||
|
||||
|
||||
|
||||
This is the first release version of the relinker scripts 3.1
|
||||
This is the first release version of the relinker scripts 3.2
|
||||
|
||||
|
||||
|
||||
|
|
@ -48,7 +48,7 @@ Port=3769
|
|||
|
||||
|
||||
|
||||
1. Copy the package DMRGateway-TGDynRewrite-relinker-3.1.tgz to the folder/boot and also the install-relinker.sh script supplied (you can do this with a card reader from windows if you like)
|
||||
1. Copy the package DMRGateway-TGDynRewrite-relinker-3.2.tgz to the folder/boot and also the install-relinker.sh script supplied (you can do this with a card reader from windows if you like)
|
||||
|
||||
|
||||
2. run /boot#./install-relinker which should create folders /opt/script/script and /var/log/script/various working files and logfile. it also sets up services in systemd
|
||||
|
|
|
|||
|
|
@ -1,17 +0,0 @@
|
|||
#!/bin/bash
|
||||
|
||||
|
||||
|
||||
|
||||
cd /
|
||||
rm -rf DMRGa*
|
||||
cd /opt
|
||||
rm -rf script
|
||||
cd /var/log
|
||||
rm -rf script
|
||||
|
||||
cd /boot
|
||||
cp DMRGateway*.tgz /
|
||||
cd /
|
||||
tar -xvf DMRGateway*.tgz
|
||||
systemctl daemon-reload
|
||||
|
|
@ -3,6 +3,14 @@
|
|||
|
||||
source /opt/script/script.conf
|
||||
|
||||
exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
exec 1>/var/log/script/checkBMAPI.log 2>&1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#check BM API
|
||||
|
||||
|
|
@ -121,7 +129,8 @@ check_if_nothing_linked_slot2(){
|
|||
|
||||
}
|
||||
|
||||
|
||||
while :
|
||||
do
|
||||
check_BM_API
|
||||
echo
|
||||
$checkslot1
|
||||
|
|
@ -130,9 +139,4 @@ $slot1notlinked
|
|||
$slot2notlinked
|
||||
echo
|
||||
sleep $slowdown
|
||||
/bin/bash /opt/script/relink-hotspot.sh >> /var/log/script/checkBMAPI.log 2>&1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
done
|
||||
|
|
@ -3,6 +3,13 @@
|
|||
|
||||
source /opt/script/script.conf
|
||||
|
||||
exec 3>&1 4>&2
|
||||
trap 'exec 2>&4 1>&3' 0 1 2 3
|
||||
exec 1>/var/log/script/checkBMAPI.log 2>&1
|
||||
|
||||
|
||||
|
||||
|
||||
|
||||
#check BM API
|
||||
|
||||
|
|
@ -122,6 +129,9 @@ check_if_nothing_linked_slot2(){
|
|||
}
|
||||
|
||||
|
||||
|
||||
while :
|
||||
do
|
||||
check_BM_API
|
||||
echo
|
||||
$checkslot1
|
||||
|
|
@ -130,5 +140,4 @@ $slot1notlinked
|
|||
$slot2notlinked
|
||||
echo
|
||||
sleep $slowdown
|
||||
/bin/bash /opt/script/relink-repeater.sh >> /var/log/script/checkBMAPI.log 2>&1
|
||||
|
||||
done
|
||||
|
|
|
|||
|
|
@ -1,14 +1,14 @@
|
|||
#!/usr/bin/bash
|
||||
repeater=234587501
|
||||
call=M0VUB
|
||||
defaultslot1=0
|
||||
defaultslot2=2350
|
||||
repeater=235192
|
||||
call=GB3IN
|
||||
defaultslot1=23590
|
||||
defaultslot2=91
|
||||
minrelinktimerslot1=30
|
||||
minrelinktimerslot2=30
|
||||
slowdown=10
|
||||
checkslot1=
|
||||
slowdown=0
|
||||
checkslot1=check_status_slot1
|
||||
checkslot2=check_status_slot2
|
||||
slot1notlinked=
|
||||
slot1notlinked=check_if_nothing_linked_slot1
|
||||
slot2notlinked=check_if_nothing_linked_slot2
|
||||
|
||||
#configuration above enabled to watch slot 2 only on a hotspot
|
||||
|
|
|
|||
|
|
@ -6,7 +6,10 @@ sleep 1
|
|||
cd /var/log/script
|
||||
sleep 1
|
||||
tar -xvf var-log-script.tgz
|
||||
|
||||
echo -n "" > /var/log/script/static-slot1.txt
|
||||
echo -n "" > /var/log/script/static-slot2.txt
|
||||
echo -n "" > /var/log/script/slot1.txt
|
||||
echo -n "" > /var/log/script/slot2.txt
|
||||
|
||||
|
||||
|
||||
|
|
|
|||
Binary file not shown.
|
|
@ -1 +0,0 @@
|
|||
{"reflector":{"reflector":0,"interval":0,"active":4000},"blockedGroups":[],"staticSubscriptions":[{"talkgroup":91,"networkid":2341,"repeaterid":235192,"slot":2,"type":"tarantool"},{"talkgroup":23590,"networkid":2341,"repeaterid":235192,"slot":1,"type":"tarantool"}],"dynamicSubscriptions":[],"timedSubscriptions":[],"clusters":[]}
|
||||
Binary file not shown.
Loading…
Reference in a new issue