-
Notifications
You must be signed in to change notification settings - Fork 135
Install Flood as a service (systemd)
jdarias edited this page Mar 10, 2021
·
7 revisions
-
Install Flood
-
Create a service user for Flood
This is for security. Check Security section for more details. You may skip this section if you already have an unprivileged user.
sudo useradd --create-home --shell /bin/false download
- Create the file
/etc/systemd/system/[email protected]
[Unit]
Description=Flood service for %I
After=network.target
[Service]
User=%I
Group=%I
Type=simple
KillMode=process
ExecStart=/usr/bin/env flood
Restart=on-failure
RestartSec=3
[Install]
WantedBy=multi-user.target
Here you can append parameters to
flood
in the ExecStart line. See Configuration for a list of available options. Use --<option>=<value> pairs. I.e
ExecStart=/usr/bin/env flood --host="127.0.0.1" --baseuri="/" --port=3000
- Enable Flood service (run at boot)
# e.g. sudo systemctl enable [email protected]
sudo systemctl enable flood@<replace with service user>.service
- Start Flood
# e.g. sudo systemctl start [email protected]
sudo systemctl start flood@<replace with service user>.service