If you run a linux distro such as ubuntu/centos7/fedora/arch linux/etc, it is more than likely it will use systemd as the init system. if your server is running any type of panel, like cpanel or plesk, you might want to contact your host. as sometimes they have their own way of doing things. your host will be able to tell you if your server's OS uses systemd (and if they can't tell you what init system it uses, i would highly recommend it is time to find a new host ).
This guide will assume you are familiar with linux command line, and the applications it uses. if you are not, do not proceed any further. you can cause serious harm to your server if you simply do not know what you are doing. I also do not provide any warranty with this guide and i do not offer any support on it. i would highly recommend contacting your host and/or hiring a system admin at this point to proceed any further. again, i can not be held responsible for any damage you may do to your server by following this guide. with that out of the way, we can now continue.
- an good understand of the linux command line
- what init system your OS is running
- super user privileges
- ssh access (in windows this can be access via an app called putty which is a free download, in mac os x and linux, use your terminal emulator to connect via ssh).
if you don't understand one or any of the above mentioned things in requirements, turn back NOW!
- you will need super user privileges to proceed, if you are logged in as root, you can use the commands as is, if not, you will need to prefix them with sudo or su.
we will need to create a service file:
- once the file has been created, we will need to open it in a editor, i will use nano here as vi drives me insane.
once it is open, copy the following content in and replace the red text with the right information:Quote
Description=babble.js startup script
#User=<a system user>
#Group=<the group the user is apart of>
- ctrl+o will save it, ctrl+x will exit out of nano. NOTE: have the port match what is in the babble.js/ACP for port.
enable the service:
systemctl enable babble-startup.service
- start the service:
- systemctl start babble-startup.service
- check the status:
- systemctl status babble-startup.service
the init script should now be running, and if babble.js crashes or the server is restarted, it should now start the babble.js on its own. again this guide is without warranty and support and use at your own risk.
Edited by Michael