Subj : Re: poll.bsy To : pweck From : paulie420 Date : Sat Oct 19 2024 06:02 pm pw> i know there has been posts about issues with poll.bsy hanging. so pw> instead of sticking with the most recent version, i backed down to the pw> most recent stable version and still see poll.bsy hanging a few times a pw> week! pw> pw> anyway, i am running pi 32 bit and wondering if anyone has a solution or pw> work-around for the ongoing issue. I wrote a script that *I* trust. Please review it for yourself, I could be an idiot and all... ----- $ cat bsy.sh #!/usr/bin/env bash # Mystic BBS software .bsy file manager # At times, Mystic leaves a poll.bsy, mutil.bsy, or mis.bsy file when it should # NOT be present. This script checks if fidopoll or mutil is running; if neither # process is running (meaning those .bsy files should NOT be present) - it then # checks for any .bsy files that have been present for longer than 60 minutes # and removes them if found. This helps prevent stale or orphaned .bsy files # from causing issues with the system. # Set the working directory to the Mystic installation directory WDIR="/home/pi/mystic" # Change to the working directory cd $WDIR # Check if the 'mis poll' or 'mutil' is running. # The \ps command ensures that we use the system's ps command, bypassing any # aliases. If either are running, set output to "RUNNING", otherwise set it to # "NOT RUNNING". F=$(\ps -ef | grep "mis poll" | grep -v grep >/dev/null; [ $? -gt 0 ] && echo "NOT RUNNING" || echo "RUNNING") M=$(pidof mutil; [ $? -gt 0 ] && echo "NOT RUNNING" || echo "RUNNING") # Find all .bsy files related to Mystic that have been modified more than 60 # minutes ago. The -mmin +60 option filters for files older than 60 minutes. B=$(find . -type f -name "*.bsy" -mmin +60 | grep echomail | wc -l) # Display the status of fidopoll and mutil processes and the number of old .bsy # files found. cat << EOF Fidopoll pidof result: $F Mutil pidof result: $M Number of BSY files (older than 60 min): $B EOF # If there are any .bsy files older than 60 minutes, and neither fidopoll nor i # mutil is running, it means these .bsy files are likely orphaned and can be # safely removed. if [[ $B -gt 0 && ($F == "NOT RUNNING" && $M == "NOT RUNNING") ]]; then # Inform the user that orphaned .bsy files are being cleared. echo -e "\nClearing $B orphaned BSY files (older than 60 min)..." # Loop through each .bsy file found and remove it. for F in $(find . -type f -name "*.bsy" -mmin +60 | grep echomail); do echo "Removing: $F"; rm $F done # Run the mailout process using mutil to ensure any queued mail is processed. ./mutil mailout # Force a fidopoll to make sure the system is synchronized with other nodes. ./mis poll force fi ----- |07p|15AULIE|1142|07o |08......... --- Mystic BBS v1.12 A49 2024/05/29 (Linux/64) * Origin: 2o fOr beeRS bbs>>>20ForBeers.com:1337 (21:2/150) .