This is an old revision of the document!


Start Synchornet 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

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

See Also

howto/systemd.1479751272.txt · Last modified: 2016/11/21 10:01 by ragnarok
Back to top
CC Attribution 4.0 International
Driven by DokuWiki Recent changes RSS feed Valid CSS Valid XHTML 1.0