[arm-allstar] Smlogger Syntax / Connect and Disconnect Notifications
Travis French
tfrench at pcb.com
Tue Feb 1 08:24:30 EST 2022
Good Morning,
UPDATE: I think I figured it out. I was missing the "!" in "#!/bin/bash".
-----Original Message-----
From: ARM-allstar <arm-allstar-bounces at hamvoip.org> On Behalf Of "Travis French via ARM-allstar"
Sent: Tuesday, January 25, 2022 7:42 AM
To: ARM Allstar <arm-allstar at hamvoip.org>
Cc: Travis French <tfrench at pcb.com>
Subject: [arm-allstar] Smlogger Syntax / Connect and Disconnect Notifications
External Email Notice: This email originated from outside the PCB / Temposonics organization.
Good Morning,
I noticed that earlier this month, my connection log and notifications for connects and disconnects had stopped working. I am currently redirecting my connect and disconnect programs in rpt.conf to two custom scripts. Did something change in one of the recent updates that might make the following syntax now invalid? If I uncomment the original smlogger callout in rpt.conf, the connection log works great. If I execute one of the custom scripts below from the bash shell, I receive the expected text message with the node numbers missing from the message. If I let it run as it has been working for some time now as shown below, the log does not populate and there are no messages sent. Both scripts are also set to 777 for permissions.
Any help would be greatly appreciated.
---------------------------------------------------------------------------------------------------------------------
In rpt.conf:
connpgm=/usr/local/sbin/k2pcb_connect_script.sh
discpgm=/usr/local/sbin/k2pcb_disconnect_script.sh
---------------------------------------------------------------------------------------------------------------------
k2pcb_connect_script.sh:
#/bin/bash
nice_date='+%a %m/%d @ %l:%M %p'
/usr/local/sbin/supermon/smlogger 1 $1 $2 if [ "$2" != "473390" ] && [ "$2" != "473391" ] && [ "$2" != "47872" ] then
: # do nothing
echo $2 to $1 on $(date "$nice_date") | mail -s "CONNECT" MYPHONENUM at vtext.com fi
---------------------------------------------------------------------------------------------------------------------
k2pcb_disconnect_script.sh
#/bin/bash
nice_date='+%a %m/%d @ %l:%M %p'
/usr/local/sbin/supermon/smlogger 0 $1 $2 if [ "$2" != "473390" ] && [ "$2" != "473391" ] && [ "$2" != "47872" ] then
: # do nothing
echo $2 from $1 on $(date "$nice_date") | mail -s "DISCONNECT" MYPHONENUM at vtext.com fi
---------------------------------------------------------------------------------------------------------------------
Thank you in advance,
Travis - K2PCB
_______________________________________________
ARM-allstar mailing list
ARM-allstar at hamvoip.org
http://lists.hamvoip.org/cgi-bin/mailman/listinfo/arm-allstar
Visit the BBB and RPi2/3/4 web page - http://hamvoip.org
More information about the ARM-allstar
mailing list