clarifying instructions, deactivating debug output

This commit is contained in:
Wolfgang 2024-01-07 20:31:12 +01:00
parent 08a1672c97
commit 9aae9a8398
2 changed files with 6 additions and 7 deletions

View file

@ -8,7 +8,7 @@ Similar to other [gateways](https://hampager.de/dokuwiki/doku.php#gateways_apps)
### DAPNET account
A normal account at [hampager.de](https://support.hampager.de/open.php) (select 'Help Topic -> New DAPNET Account with or without RIC').
A normal account at [hampager.de](https://support.hampager.de/open.php) (select 'Help Topic -> New DAPNET Account with RIC').
A transmitter registered at [hampager.de](https://support.hampager.de/open.php) (select 'Help Topic -> New DAPNET Transmitter').
@ -35,7 +35,7 @@ apt install perl-base libio-socket-timeout-perl libhttp-message-perl libwww-perl
## Installation
Instructions for installing the script to $HOME/bin/
Instructions for installing the script to $HOME/bin/ and activating a systemd user service for running the script
```console
mkdir -p $HOME/.config/systemd/user/
cp dapnet2ntfy.service $HOME/.config/systemd/user/

View file

@ -8,7 +8,7 @@ use warnings;
# configuration
my $version = '0.5.0';
my $version = '0.5.1';
my $dapnet_username = '';
my $dapnet_password = '';
my $dapnet_server = 'dapnet.afu.rwth-aachen.de';
@ -17,13 +17,14 @@ my $dapnet_port = '43434',
my $ntfy_username = '';
my $ntfy_password = '';
my $ntfy_url = 'https://server/topic';
my $debug = 1;
my $debug = 0;
my $dapnet_timeout_read_seconds = 125;
my $dapnet_timeout_write_seconds = 5;
my %rics = (
# on pager
'630224' => 'PM',
# add you own RIC in next line
'' => 'PM',
'1041' => 'MOWAS',
'1063' => 'METAR',
'1064' => 'WX-Lokal',
@ -124,7 +125,6 @@ while ($run) {
$reconnect = 1;
next;
}
#$socket->recv($data,1024);
chomp $data;
debug_print "received: $data.\n" ;
if ($data =~ /^2:(.*)$/) {
@ -192,6 +192,5 @@ while ($run) {
#}
sleep(1);
}
#$socket->close();
$socket->shutdown(SHUT_RDWR);
}