Hello,
I create a fivem server and i want create a service to auto my server when my debian start. I created a service called fivem,
Here is the content:
[Unit]
Description=fivem
After=network.target
[Service]
WorkingDirectory=/home/fivem/
User=fivem
Group=fivem
Restart=always
ExecStart=/usr/bin/screen -DmS fivem ./run.sh +exec ./server-data/server.cfg
ExecStop=kill fivem
[Install]
WantedBy=multi-user.target
Buuut the server does not start I do not understand I try to see with: screen -ls and netstat -ntpul
Futhers informations:
root@debian:~# systemctl start fivem.service
root@debian:~# netstat -ntpul
Active Internet connections (only servers)
Proto Recv-Q Send-Q Local Address Foreign Address State PID/Program name
tcp 0 0 0.0.0.0:22 0.0.0.0:* LISTEN 795/sshd
tcp6 0 0 :::22 :::* LISTEN 795/sshd
root@vmi278249:~# systemctl status fivem.service
● fivem.service - fivem
Loaded: loaded (/etc/systemd/system/fivem.service; enabled; vendor preset: enabled)
Active: failed (Result: start-limit-hit) since Thu 2019-07-04 23:35:19 CEST; 11s ago
Process: 10589 ExecStart=/usr/bin/screen -DmS fivem ./run.sh +exec ./server-data/server.cfg (code=exited, status=0/SUCCESS)
Main PID: 10589 (code=exited, status=0/SUCCESS)
Jul 04 23:35:19 debian systemd[1]: fivem.service: Service hold-off time over, scheduling restart.
Jul 04 23:35:19 debian systemd[1]: Stopped fivem.
Jul 04 23:35:19 debian systemd[1]: fivem.service: Start request repeated too quickly.
Jul 04 23:35:19 debian systemd[1]: Failed to start fivem.
Jul 04 23:35:19 debian systemd[1]: fivem.service: Unit entered failed state.
Jul 04 23:35:19 debian systemd[1]: fivem.service: Failed with result ‘start-limit-hit’.
Can you help me, please?
Thank you in advance