Maybe I'm a little bit off topic, but up to Adrian's post:

--- In [email protected], Adrian <vk4...@...> wrote:
> Probably need K6ACS admin  to restart dplus, to load the new
reflector.
> vk4tux

... here is how I modified dplus start and stop: because dplus will run
as long as the gateway runs and it will never rotate its log file, I
decided to force a restart of dplus once per week. I put a little script
into the folder /etc/cron.weekly which guesses the actually status if
linked or unlinked, posting a prerecorded message about restarting dplus
service and rotate the log.

Maybe others find this script usefully, and by the way it re-reads the
information on available reflectors.

Here comes the script:

#!/bin/bash
grep -i "remote gateway " /dstar/tmp/status > /dev/null
LINKSTAT="$?"

if [ "$LINKSTAT" = "0" ] ; then
   cp /dstar/tmp/dplusrestartlink.dvtool /dstar/tmp/play-a.dvtool
   sleep 1
   cp /dstar/tmp/dplusrestartlink.dvtool /dstar/tmp/play-b.dvtool
else
   cp /dstar/tmp/dplusrestart.dvtool /dstar/tmp/play-a.dvtool
   sleep 1
   cp /dstar/tmp/dplusrestart.dvtool /dstar/tmp/play-b.dvtool
fi
sleep 1

for i in 6 5 4 3 2 1 ; do
   j=$(($i+1))
   mv /var/log/dplus.log.$i /var/log/dplus.log.$j
done
mv /var/log/dplus.log /var/log/dplus.log.1

sleep 5
service dplus restart > /dev/null


Additional information: we have repeater A and B connected, so I send
out messages to these two ports. Version one will be played if a link is
established and tells the user to reconnect after a while manually. The
other message will just tell the users that dplus will be restarted. I
recorded these message files using the echo function of dplus earlier.


73 de Reiner, dh9fax

Reply via email to