clarifying instructions, deactivating debug output

This commit is contained in:
Wolfgang 2024-08-01 20:31:12 +01:00
parent 08a1672c97
commit 7a25ebb137
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 ### 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'). 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 ## 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 ```console
mkdir -p $HOME/.config/systemd/user/ mkdir -p $HOME/.config/systemd/user/
cp dapnet2ntfy.service $HOME/.config/systemd/user/ cp dapnet2ntfy.service $HOME/.config/systemd/user/

View file

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