-
Notifications
You must be signed in to change notification settings - Fork 27
Run Dispatch as systemd service
mispp edited this page Nov 25, 2018
·
2 revisions
To run dispatch as a systemd service do the following:
- create a user called
dispatch
and lock it so outside ssh connections cannot be made with this user- run:
useradd --create-home --group users --shell=/bin/bash dispatch
- run:
usermod -L dispatch
- run:
- make a directory in that users home dir called bin
- extract dispatch in
/home/dispatch/bin
- add following systemd service to
/etc/systemd/system
(full path:/etc/systemd/system/dispatch.service
)
[Unit]
Description=Dispatch IRC client
Wants=network-online.target
After=network-online.target
[Service]
Type=simple
ExecStart=/home/dispatch/bin/dispatch
User=dispatch
Group=nogroup
Restart=on-failure
RestartSec=5
StartLimitInterval=60s
StartLimitBurst=3
[Install]
WantedBy=default.target
- run
systemctl daemon-reload
- start service with
systemctl start dispatch
Note:
- works on ubuntu 18.04, might need changes for other distributions
- adding user to group 'users' might not be the best thing, adjust the useradd accordingly