# Synchronet BBS systemd 'unit configuration' file
#
# 1. Copy or symlink this file to the correct directory
#    e.g. for Debian/Ubuntu Linux, that would be: /lib/systemd/system
# 2. If necessary, modify the SBBSCTRL environment variable value to match your install
# 3. If necessary, modify the User and Group values to match your install
# 4. If necessary, modify the path in the ExecStart value to match your install
#    Edits should be made using "sudo systemctl edit sbbs", thus creating the file:
#    /etc/systemd/system/sbbs.service.d/override.conf
# 5. Enable the BBS service by running "sudo systemctl enable sbbs"
# 6. To run the BBS service without rebooting, run "sudo systemctl start sbbs"
#
# Tips:
# A. To query the status of the BBS service, run "systemctl status sbbs"
# B. To browse the log output of the BBS service, run "journalctl -u sbbs"
# C. To monitor the live log outupt of the BBS service, run "journalctl -f -u sbbs"

[Unit]
Description=Synchronet BBS
Documentation=http://wiki.synchro.net/
After=syslog.target network-online.target

[Service]
Type=forking
NotifyAccess=all
Environment=SBBSCTRL=/sbbs/ctrl
User=sbbs
Group=sbbs
AmbientCapabilities=CAP_NET_BIND_SERVICE
ExecStart=/sbbs/exec/sbbs d
ExecReload=/bin/kill -HUP $MAINPID
Restart=on-failure
RestartSec=30
LimitNOFILE=10000

[Install]
WantedBy=multi-user.target