Do you have a script that you'd share for the nightly build on you Deb System.
I threw together a quick script that I want to run as a Synchronet Timed even, but I am sure you have something better ... this runs on a Raspberry Pi with raspbian deb
#!/bin/bash
echo -e "\e[0;34mSynchronet BBS Auto-Update\n"
echo -e "\e[1;33m;Updating CVS Repositories\e[1;34m"
cd ~/sbbs/3rdp
cvs update
cd ~/sbbs/src
cvs update
cd ~/sbbs/src/sbbs3
echo -e "\e[1;33mRebuilding Synchronet BBS\e[1;34m"
make RELEASE=1 DOSEMU=1 2>&1 | tee ~/sbbs/sbbs-rebuild.log
sed -i '1iLast Rebuild on '"`date`"' ' ~/sbbs/sbbs-rebuild.log
cd ~/sbbs/src/sbbs3/gcc.linux.armv7l.exe.release
echo -e "\033[1;33mKilling SBBS"
sudo pkill sbbs
sudo rm -f /var/run/sbbs.pid
echo -e "Copying new executables to /sbbs/exec/"
sleep 5s
cp -p * /sbbs/exec
export SBBSCTRL=/sbbs/ctrl
echo "Re-Launching Synchronet SBBS"
sleep 3s
clear
sudo systemctl start sbbs
echo -e "\nDone!\e[1;34m\n"
I was hoping you'd comment on the pkill
command. I was going to drop the shutdown
semaphore file into /sbbs/data ... will that
be a graceful shutdown?
I was poking around
a bit to see if there are any files that
indicate a service is in use which would
allow the script to wait until the board is
idle.
I have the build directory tree in a
different location than where I run the board
from so I used cp * instead of install.
Re: Re: Nightly Build
By: Mortifis to Digital Man on Thu Oct 11 2018 03:06 pm
I was hoping you'd comment on the pkill
command. I was going to drop the shutdown
semaphore file into /sbbs/data ... will that
be a graceful shutdown?
Yes:
http://wiki.synchro.net/config:semfiles
I was poking around
a bit to see if there are any files that
indicate a service is in use which would
allow the script to wait until the board is
idle.
No, anything like that would have inherent race conditions.
No, anything like that would have inherent race conditions.
digital man
Re: Re: Nightly Build
By: Mortifis to Digital Man on Thu Oct 11 2018 03:06 pm
I was hoping you'd comment on the pkill
command. I was going to drop the shutdown
semaphore file into /sbbs/data ... will that
be a graceful shutdown?
Yes:
http://wiki.synchro.net/config:semfiles
I was poking around
a bit to see if there are any files that
indicate a service is in use which would
allow the script to wait until the board is
idle.
No, anything like that would have inherent race conditions.
So, I was experimenting and wondering about the shutdown semfile and how the internal workings of SBBS uses it. For instance, if I drop the shutdown sem while I am logged in via http or telnet, etc, it waits until the clients disconnects before shutting that that paticular service, so is there a race condition blocker (semantics) that stops another, say, telnet process from being spawning?
I also notice that when someone logs in via telnet for
example the 'time is reduced for an upcoming event' so if I were to run my weekly rebuild as a timed even that drops a shutdown semfile would this be considered a graceful shutdown and allow the rebuild/restart to be executed correctly?
Sysop: | sneaky |
---|---|
Location: | Ashburton,NZ |
Users: | 28 |
Nodes: | 8 (0 / 8) |
Uptime: | 189:42:43 |
Calls: | 2,004 |
Calls today: | 1 |
Files: | 11,114 |
Messages: | 942,271 |