[nos-bbs] Start script with auto restart loop

K3CHB k3chb at k3chb.ampr.org
Thu Mar 5 14:48:05 EST 2020


I came up with this and it seems to work.

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

 
> #!/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

Thanks for all your help.

73

-- 
K3CHB

-Sent from claws-mail/linux



More information about the nos-bbs mailing list