Fix automatic restart and web update interval

This commit is contained in:
30hours 2023-10-27 21:51:54 +10:30
parent 161ec95b05
commit ce0cb20a42
3 changed files with 6 additions and 4 deletions

View file

@ -7,9 +7,9 @@ var isLocalHost = (host === "localhost" || host === "127.0.0.1" || host === "192
var urlMap = '' var urlMap = ''
if (isLocalHost) { if (isLocalHost) {
urlMap = '//' + host + ':3000/map'; urlMap = '//' + host + ':3000/map?timestamp=' + Date.now();
} else { } else {
urlMap = '//' + host + '/api/map'; urlMap = '//' + host + '/api/map?timestamp=' + Date.now();
} }
var data = [ var data = [
@ -127,4 +127,4 @@ var intervalId = window.setInterval(function () {
.always(function () { .always(function () {
}); });
}, 100); }, 500);

View file

@ -9,4 +9,5 @@ if [[ "$FIRST_CHAR" != "{" ]]; then
docker compose -f /opt/blah2/docker-compose.yml down docker compose -f /opt/blah2/docker-compose.yml down
systemctl restart sdrplay.service systemctl restart sdrplay.service
docker compose -f /opt/blah2/docker-compose.yml up -d docker compose -f /opt/blah2/docker-compose.yml up -d
echo "Successfully restarted blah2"
fi fi

View file

@ -1 +1,2 @@
* * * * * /opt/blah2/script/blah2.bash # add to /etc/crontab
*/5 * * * * root /opt/blah2/script/blah2.bash