-
Notifications
You must be signed in to change notification settings - Fork 70
Closed
Description
Since I wanted to start atomic-server whenever it crashes because of my memory issue #270, I created a systemd setup. Might be useful to others.
Also, I'm considering to add similar functionality to the server itself. Maybe add a setup-service or daemon subcommand that installs something like this.
How to make atomic-server a service
Create a service:
vim /etc/systemd/system/atomic.service
Paste this:
[Unit]
Description=Atomic-Server
#After=network.targetdd
StartLimitIntervalSec=0[Service]
[Service]
Type=simple
Restart=always
RestartSec=1
User=root
ExecStart=/root/atomic-server
WorkingDirectory=/root/
EnvironmentFil=/root/.env
[Install]
WantedBy=multi-user.target
# start service
systemctl run atomic
# check status
systemctl status atomic
# restart
systemctl restart atomic
# logs
journalctl -u atomic.service
# logs, since one hour, follow
journalctl -u atomic.service --since "1 hour ago" -fTODO
- Allow users to create a service description like above using a command like
atomic-server service start. This could then setup theatomic.servicefile. We could also implement arestartandstop. We could use thesystemdcrate
Metadata
Metadata
Assignees
Labels
No labels