This is an old revision of the document!
Table of Contents
Start Synchronet BBS from Systemd
If you run modern GNU/Linux distributions, you can found Systemd as init system (like Debian, Fedora and others).
Instead of use the old /etc/init.d/sbbs.service init script, you can create a systemd services unit file:
Create and edit the follow files (please correct your ExecStart path and User/Group as you need):
Debian
/etc/default/sbbs
SBBSCTRL=/sbbs/ctrl
/etc/systemd/system/sbbs.service
[Unit] Description=Synchronet BBS Documentation=man:sbbs After=network.target [Service] Restart=on-failure EnvironmentFile=-/etc/default/sbbs ExecStart=/sbbs/exec/sbbs nd ExecReload=/bin/kill -HUP $MAINPID User=root Group=root [Install] WantedBy=multi-user.target
Finally, you must execute systemd daemon-reload for tell systemd te reload the unit file
Test your setup:
# systemctl status sbbs ● sbbs.service - Synchronet BBS Loaded: loaded (/etc/systemd/system/sbbs.service; enabled) Active: active (running) since lun 2016-11-21 14:39:53 ART; 24min ago Docs: man:sbbs Process: 14393 ExecStart=/sbbs/exec/sbbs nd (code=exited, status=0/SUCCESS) Main PID: 14393 (sbbs) CGroup: /system.slice/sbbs.service └─14393 /sbbs/exec/sbbs nd nov 21 14:39:53 scarlet systemd[1]: Started Synchronet BBS.
Debian (alternative using tmux)
You can use Tmux to still the Synchronet BBS console running on a screen that can be attached when you need
/etc/default/sbbs
SBBSCTRL=/sbbs/ctrl
/etc/systemd/system/sbbs.service
[Unit] Description=Synchronet BBS Documentation=man:sbbs After=network.target [Service] Restart=on-failure Type=forking KillMode=none EnvironmentFile=-/etc/default/sbbs ExecStart=/usr/bin/tmux new-session -d -s sbbs '/sbbs/exec/sbbs nd' ExecStop=/usr/bin/tmux send-keys -t sbbs 'q' C-m 'exit' C-m User=root Group=root [Install] WantedBy=multi-user.target
Using tmux, Synchronet start in a session (called sbbs), you can attach to the running console using tmux attach -t sbbs