[arm-allstar] Smlogger Syntax / Connect and Disconnect Notifications

Travis French tfrench at pcb.com
Tue Jan 25 07:41:51 EST 2022


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


More information about the ARM-allstar mailing list