mirror of
https://github.com/GNS3/gns3-server
synced 2025-01-01 11:40:56 +00:00
Let systemd directly supervises the GNS3 service. Fixes #1678
This commit is contained in:
parent
af3ae0df24
commit
85582554ac
@ -252,18 +252,20 @@ else
|
|||||||
cat <<EOFI > /lib/systemd/system/gns3.service
|
cat <<EOFI > /lib/systemd/system/gns3.service
|
||||||
[Unit]
|
[Unit]
|
||||||
Description=GNS3 server
|
Description=GNS3 server
|
||||||
|
After=network-online.target
|
||||||
|
Wants=network-online.target
|
||||||
|
Conflicts=shutdown.target
|
||||||
|
|
||||||
[Service]
|
[Service]
|
||||||
Type=forking
|
|
||||||
User=gns3
|
User=gns3
|
||||||
Group=gns3
|
Group=gns3
|
||||||
PermissionsStartOnly=true
|
PermissionsStartOnly=true
|
||||||
|
Environment="PATH=/usr/local/sbin:/usr/local/bin:/usr/sbin:/usr/bin:/sbin:/bin"
|
||||||
ExecStartPre=/bin/mkdir -p /var/log/gns3 /var/run/gns3
|
ExecStartPre=/bin/mkdir -p /var/log/gns3 /var/run/gns3
|
||||||
ExecStartPre=/bin/chown -R gns3:gns3 /var/log/gns3 /var/run/gns3
|
ExecStartPre=/bin/chown -R gns3:gns3 /var/log/gns3 /var/run/gns3
|
||||||
ExecStart=/usr/bin/gns3server --log /var/log/gns3/gns3.log \
|
ExecStart=/usr/bin/gns3server --log /var/log/gns3/gns3.log
|
||||||
--pid /var/run/gns3/gns3.pid --daemon
|
Restart=on-failure
|
||||||
Restart=on-abort
|
RestartSec=5
|
||||||
PIDFile=/var/run/gns3/gns3.pid
|
|
||||||
|
|
||||||
[Install]
|
[Install]
|
||||||
WantedBy=multi-user.target
|
WantedBy=multi-user.target
|
||||||
|
Loading…
Reference in New Issue
Block a user