Running as a service
Using systemd, run WildBeast as a service for automatic (re)starting
Making a new service
Start creating a new service:
sudo nano /etc/systemd/system/wildbeast.serviceCopy and paste the following example:
[Unit]
After=network.target network-online.target
Requires=network.target network-online.target
StartLimitBurst=3
StartLimitIntervalSec=0
[Service]
WorkingDirectory=/REPLACE THIS
Type=simple
Restart=on-failure
RestartSec=1
User=REPLACE THIS
ExecStart=/usr/bin/env npm start
[Install]
WantedBy=multi-user.targetPay attention to the REPLACE THIS, as you might've guessed you need to replace these values.
WorkingDirectory- The folder where you saved WildBeastFor example:
/home/wildbeast/WildBeastUser- The user that's going to run WildBeastDo NOT use
root, create a new user for safety.
Controlling the service
Starting
sudo systemctl start wildbeast.serviceStopping
sudo systemctl stop wildbeast.serviceStart on boot
sudo systemctl enable wildbeast.serviceTo undo:
sudo systemctl disable wildbeast.serviceRestarting
sudo systemctl restart wildbeast.serviceLast updated
Was this helpful?
