Subj : Re: Bad .bsy handling To : Geri Atricks From : paulie420 Date : Thu Jan 19 2023 04:44 pm GA> I use that in my polling events. The batch file is just for starting the GA> BBS after a restart where it's very likely that the server was not GA> shutdown properly, like after a power failure or system freeze. Nice... I check for them first, but suppose I spoke up a BIT too quick: ----- #!/bin/bash sem="/home/pi/mystic/semaphore" pid=$(ps aux | grep "./mis daemon" | grep -v grep | awk -F " " '{ print $2 }') cd /home/pi/mystic/ if [ -f $sem/mis.bsy ]; then if [[ "$pid" -lt 1 ]]; then echo "Doesn't appear to be running although there's a semaphore file so we'll delete that now and run the server." rm $sem/*.bsy ./mis daemon else echo "Server already running." fi else echo "Server not running, starting it now." ./mis daemon fi ----- Cheers!! |07p|15AULIE|1142|07o |08......... --- Mystic BBS v1.12 A48 (Linux/64) * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150) .