blob: 544e4de77831240a78ff45bb10487cbd19cd4ed7 (
plain)
- #!/usr/bin/perl
- open(LOGFILE,"/etc/kannel/kannel.conf");
- while (<LOGFILE>) {
- /^smsc-id\h+=\h+(\S+)/ && do {
- $smsc=$1
- };
- /^my-number\h+=\h+\+?(45)?(\S+)/ && do {
- $i++;
- $a .= "$2 ($smsc)\n"
- }
- };
- open(PS,"ps ax|");
- do {
- /perl\s.*markdown2sms.*sms\s*\+?(45)?(\d+)\s+\b(\S+)/ && do {
- $j++; $b .= "$2: $3\n";
- };
- } while (<PS>);
- print "$i phones:\n$a";
- print "\n$j series:\n$b" if ($j);
|