Jnos start with screen

Jimmy K3CHB, Was looking at how he could get a restart option in Jnos in combination with “screen”.

Below how he did it.

Startnos

#!/bin/bash
echo "Starting [JNOS-2.0n.beta-IHM$]"
screen -d -m -S jnos-console ./nos.loop exit 0

Nos.loop

#!/bin/bash
# JNOS 2.0 Loop script by K3CHB

exit_code=-1
killall -KILL jnos 2> /dev/null
 
while [ $exit_code -ne 0 ]
do
     cd /jnos
     rm -f /jnos/spool/mqueue/*.lck 2> /dev/null
     rm -f /jnos/spool/mail/*.lck 2> /dev/null
     rm -f /jnos/spool/ptmx_direwolf.cfg 2> /dev/null
     sleep 2
     grep -o "/dev/pts/." /jnos/direwolf.log > /jnos/spool/ptmx_direwolf.cfg 
     sleep 2
     export TZ=EST5EDT
     export TERM=xterm-color
     /jnos/jnos -g2 -i -d/jnos && exit_code=0
done
 
exit 0