Instructions on how to update RMSGateway

Instructions on how to update to the latest scripts supporting Winlink
V5 CMS Web Services.

You need to complete this update soon as Winlink is switching its Web
Services over to only support their latest version. Note that no C
files changed for this upgrade just python scripts & the
/etc/rmsgw/hosts file.

First check your python version:

python –version

The new scripts have a requirement of python version 2.7.9 or above.
If you are running a Debian distribution then wheezy will not work,
jessie, stretch & sid are OK.

Second check that you have an /etc/rmsgw/sysop.xml file.

If you don’t have a sysop.xml file then read the admin/README.md file
https://github.com/nwdigitalradio/rmsgw/blob/master/admin/README.md

Note that the getsysop.py & mksysop.py scripts currently do not work
for the new Winlink Web Services because the SysopGet web service is
not enabled for our key. This may change in the future. If you do not
have a sysop.xml file you can use mksysop.py BEFORE you do the update.

If your system passed the python version test then you can easily
upgrade like this:

git clone https://github.com/nwdigitalradio/rmsgw
cd rmsgw/admin
# become root & run this command
…/admin-update.sh

Verify that the update is working

# As root run the test script in the admin directory

…/testwlapi.sh

# Search the log file for any errors
# The log file grabs some of the rms.debug log file and you are only
# concerned with errors found after you ran the test script

grep -i error /root/tmp/debuglog.txt

Now go to winlink.org (https://winlink.org/RMSChannels) and look at
the Winlink Packet RMS Map/RMS List/Gateway Versions sections.
Search for your call sign.

For more information read the README.md file in the rmsgw/admin
directory here:
https://github.com/nwdigitalradio/rmsgw/blob/master/admin/README.md

/Basil n7nix

RMSGateway New version

There is a new version of RMSGateway. This is at the moment in Beta test. See the mail of Basil N7NIX.
If you like to test the new code. Just mail N7NIX. basil (@) pacabunga.com

 

The new code (version 2.5.0) has been running on a few machines for the
last couple of days. I would like to get a few more sites to try out the
new code before it is released.

If you would like to help please contact me directly & I will give you
instructions on how to install the new code. Only the python scripts &
xml files changed to support the latest Winlink Web Services.

Thanks,
/Basil n7nix

RmsGateway Install and Update script

C. Schuman wrote a script to install and update RMS Gateway. It`s very handy now the are very busy with updating the code of RMS Gateway to handle the new demands of Winlink.

You just have to pay attention to these lines of code that you have the right version.

cd /usr/local/src/ax25
#wget -qt 3 http://k4gbb.us/docs/scripts/rmsgw-2.4.0-181.tgz || /
wget -qt 3 http://k4gbb.no-ip.info/docs/scripts/rmsgw-2.4.0-181.1.tar.bz2
#wget -qt 3 http://www.w3sg.org/RMSGW/download/rmsgw-2.4.0-181.tgz
tar xf rmsgw-2.4.0-181.1.tar.bz2

The version rmsgw-2.4.0-181.1.tar.bz2 is of 14-Sep-2018 16:41

#!/bin/bash
# Installs/Updates the Linux RMS Gateway
# Provided by C Schuman, K4GBB k4gbb1gmail.com
#	Updated 30 Oct 2014

# Color Codes
Reset='\e[0m'
Red='\e[31m'
Green='\e[32m'
Yellow='\e[33m'
Blue='\e[34m'
White='\e[37m'
BluW='\e[37;44m'

UDATE="NO"
GWOWNER="rmsgw"

# Check  User ID

    if [ $UID != 0 ]; then
	echo "You must be root User to perform installation!"
	exit 1
    fi

echo -e "${BluW}\n \t  Install/Update Linux RMS Gate \n${Yellow}\t     version 2.4.0-181  \t \n \t \n${White}  Script provided by Charles S. Schuman ( K4GBB )  \n${Red}               k4gbb1@gmail.com \n${Reset}"

echo -e "${BluW}\t Installing Support libraries \t${Reset}"
apt-get install xutils-dev libxml2 libxml2-dev python-requests -y -q
apt-get install build-essential libax25-dev libx11-dev zlib1g-dev libncurses5-dev -y -q

#  create the group for the gateway if it doesn't exist
    grep "rmsgw:" /etc/group >/dev/null 2>&1
    if [ $? -ne 0 ]; then
	echo "Creating group rmsgw..."
	groupadd rmsgw
    fi

#  create the gateway user if it doesn't exist and lock the account

    grep "rmsgw:" /etc/passwd >/dev/null 2>&1
    if [ $? -ne 0 ]; then
	#
	# create the account
	#
 	echo "Creating user rmsgw..."
 	useradd -s /bin/false -g rmsgw rmsgw
    fi

  # lock the account to prevent a potential hole, unless the
  # owner is root
    if [ "$GWOWNER" != root ]; then
	echo "Locking user account $GWOWNER..."
	passwd -l $GWOWNER >/dev/null
	# while the account is locked, make the password to
	# never expire so that cron will be happy
	chage -E-1 $GWOWNER >/dev/null
    fi

echo -e "${BluW}\t Downloading RMS Source file \t${Reset}"

cd /usr/local/src/ax25
#wget -qt 3 http://k4gbb.us/docs/scripts/rmsgw-2.4.0-181.tgz || /
wget -qt 3 http://k4gbb.no-ip.info/docs/scripts/rmsgw-2.4.0-181.1.tar.bz2
#wget -qt 3 http://www.w3sg.org/RMSGW/download/rmsgw-2.4.0-181.tgz
tar xf rmsgw-2.4.0-181.1.tar.bz2
if [ $? -ne 0 ]
   then
 echo -e "${BluW}${Red}\t RMS File not available \t${Reset}"
 exit 1
fi

echo -e "${BluW}\t Compiling RMS Source file \t${Reset}"
cd rmsgw-2.4.0-181.1
make > RMS.txt

if [ $? -ne 0 ]
   then
 echo -e "${BluW}$Red} \tCompile error${White} - check RMS.txt File \t${Reset}"
 exit 1
   else 
 rm RMS.txt
fi
make install
echo -e "${BluW}RMS Gate Installed \t${Reset}"

# Add RMS_ACI to Crontab
cat /etc/crontab|grep rmsgw || echo "#6,36 *  * * *   rmsgw    /usr/local/bin/rmsgw_aci > /dev/null 2>&1
# (End) " >> /etc/crontab

# Install Logging
if [ ! -f "/etc/rsyslog.d/60-rmsgw.conf" ]; then
echo "# RMS Gate" > /etc/rsyslog.d/60-rms.conf 
echo "        local0.info                     /var/log/rms" >> /etc/rsyslog.d/60-rms.conf 
echo "        local0.debug                    /var/log/rms.debug" >> /etc/rsyslog.d/60-rms.conf
echo "        #local0.debug                   /dev/null" >> /etc/rsyslog.d/60-rms.conf 
echo "
# (End)" >> /etc/rsyslog.d/60-rms.conf 

service restart rsyslog
fi

# Use old rmschanstat file.
if [ -f /usr/local/bin/rmschanstat.~1~ ] ; then
    cp /usr/local/bin/rmschanstat.~1~ /usr/local/bin/rmschanstat
fi

date >> /root/Changes
echo "        RMS Gate Installed - rmsgw-2.4.0-181" >> /root/Changes
echo -e "${BluW} Be Sure to Update/Edit the channels.xml and gateway.config file${Reset}"
exit 0
# (End of Script)