diff --git a/install/systemd/httpd.service b/install/systemd/httpd.service new file mode 100644 index 0000000000000000000000000000000000000000..f0ac174d213176d981af9fb3936dbc2099ae3d11 --- /dev/null +++ b/install/systemd/httpd.service @@ -0,0 +1,44 @@ +# Synchronet Web Server systemd 'unit configuration' file +# +# Only use if you want the web server to run as a separate process from the +# other BBS servers and services. +# +# You should have [web] AutoStart=false set in your ctrl/sbbs.in file +# or else, the web server will still start as part of your normal sbbs.service unit +# (and thus part of the same 'sbbs' instance as the other server), not what you want. +# +# 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 httpd", thus creating the file: +# /etc/systemd/system/httpd.service.d/override.conf +# 5. Enable the BBS service by running "sudo systemctl enable httpd" +# 6. To run the BBS service without rebooting, run "sudo systemctl start httpd" +# +# Tips: +# A. To query the status of the BBS service, run "systemctl status httpd" +# B. To browse the log output of the BBS service, run "journalctl -u httpd" +# C. To monitor the live log outupt of the BBS service, run "journalctl -f -u httpd" + +[Unit] +Description=Synchronet Web Server +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 w! +ExecReload=/bin/kill -HUP $MAINPID +Restart=on-failure +RestartSec=30 +LimitNOFILE=10000 + +[Install] +WantedBy=multi-user.target