Update scripts.

This commit is contained in:
Jonathan Naylor
2020-04-23 21:36:43 +01:00
parent 6be27b3759
commit 8e75b2453b
12 changed files with 62 additions and 41 deletions

View File

@@ -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

View File

@@ -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

View File

@@ -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
@@ -129,10 +138,5 @@ $checkslot2
$slot1notlinked
$slot2notlinked
echo
sleep $slowdown
/bin/bash /opt/script/relink-hotspot.sh >> /var/log/script/checkBMAPI.log 2>&1
sleep $slowdown
done

View File

@@ -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
@@ -129,6 +139,5 @@ $checkslot2
$slot1notlinked
$slot2notlinked
echo
sleep $slowdown
/bin/bash /opt/script/relink-repeater.sh >> /var/log/script/checkBMAPI.log 2>&1
sleep $slowdown
done

View File

@@ -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

View File

@@ -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